adsense

Saturday, April 18, 2020

Unable to download the list of available providers Powershell

When you try to install a program you might encounter following error

WARNING: MSG:UnableToDownload «https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409» «»

WARNING: Unable to download the list of available providers. Check your internet connection.

WARNING: Unable to download from URI 'https://go.microsoft.com/fwlink/?LinkID=627338&clcid=0x409' to ''.

Install-PackageProvider : No match was found for the specified search criteria for the provider 'NuGet'. The package provider requires 'PackageManagement' and 'Provider' tags. Please check if the specified package has the tags.

At line:1 char:1

+ Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.2  01 -Force

+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

    + CategoryInfo          : InvalidArgument: (Microsoft.Power...PackageProvider:InstallPackageProvider) [Install-PackageProvider], Exception

    + FullyQualifiedErrorId : NoMatchFoundForProvider,Microsoft.PowerShell.PackageManagement.Cmdlets.InstallPackageProvider

Trying the following steps will resolve this issue.

  • Open Powershell (As Admin)
  •  execute following command in powershell prompt
          [Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
  • Try running the again!
       Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force


Cheers,
Samitha

Friday, April 10, 2020

msbuild fails to run

When you are trying to publish a web through command line  you might encounter following error

MSBUILD : error MSB1009: Project file does not exist

Fix this by adding msbuild.exe to environement variables


The path is located in the Visual Studio Installed directory.

C:\Program Files (x86)\Microsoft Visual Studio\2017\Community\MSBuild\15.0\Bin

Samitha

Saturday, March 28, 2020

fetch results of a stored procedure

If you want to get results of a executed  stored procedure, there few ways you can achieve the goal.

1. using openrowset

SELECT * INTO #TempTable FROM OPENROWSET('SQLNCLI', 'Server=(local)\SQL2008;Trusted_Connection=yes;',
     'EXEC getOrderHistory')

SELECT * FROM #TempTable

2. using temporary table

INSERT INTO #TempTable
Exec getOrderHistory 'Params'

Regards,
Samitha

Thursday, March 12, 2020

Handling Bootstrap switch checked event

If you are using Bootstrap switch, use the following jquery to track the Bootstrap switch checked event


$('.switcher').on('switchChange.bootstrapSwitch', function (event, state) {
   //more code here
 });

Regards,
Samitha

Sunday, March 1, 2020

Error: ENOENT: no such file or directory

When you are working with node js packages you might encounter  Error: ENOENT: no such file or directory, scandir '**/node_modules/node-sass/vendor' for one or some of the packages you are using.

execute following command for all the packages that gave ENOENT  error and it will fix the issue

cheers
Samitha


Tuesday, February 18, 2020

CSS select label

If we want to apply style for elements rendered  label for   use the following CSS

label[for=ID_of_the_Label]
{
    
}


Cheers,
Samitha

Sunday, February 2, 2020

'gulp' is not recognized as an internal or external command,

I have installed npm and working for the past few months without an issue. I was trying to execute a gulp task and came across the issue of gulp not working. The visual studio output displayed as follows

 'gulp' is not recognized as an internal or external command.

I fixed this issue by re installing gulp using  the following command

npm install -g gulp


Cheers,
Saamitha