Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Why continuous prompts for installing NuGet provider?
Problem: I am running Win10 client, November update. Every time I run any of the PSGet cmdlets, I get prompted to install the latest Nuget provider. Why?
Yes known issue. Will be fixed in TP5.
Cause: the old version of the nuget exists under the providerassemblies root folder. It gets imported to your current PowerShell session
Current workaround: Delete the old version from $env:ProgramFiles\PackageManagement\ProviderAssemblies $env:LOCALAPPDATA\PackageManagement\ProviderAssemblies
Or Import-packageprovider –name nuget –requiredVersion 220.127.116.11 –force to your current session
Why is my PowerShell provider not listed from Get-PackageProvider?
Try the following:
This will show you the list of available providers on your machine. If your provider is in this list, run
Import-PackageProvider -Name <MyProviderName> -Verbose
- If your provider does not show up in
Get-PackageProvider -ListAvailable, it may be because the provider is not signed. In that case, try relaxing your execution policy with
Set-ExecutionPolicy. After that, repeat step 1.
Why do my PowerShell functions return incorrect values sometimes?
If you are using a version of PackageManagement that is released before WMF5.0 RTM, then this may be caused by the use of Write-Verbose, Write-Debug, Write-Warning and Write-Error cmdlets in your functions. To fix this issue, use
$null = Write-Verbose <your string> instead of
Write-Verbose <your string>.
Can I pipe the return value of Find-Package to Install-Module and vice versa?
No, this will not work. Install-Module is a cmdlet specific to PowerShellGet provider whereas Find-Package is a general PackageManagement cmdlet (which means it may use a provider that is not PowerShellGet). You can pipe the result of Find-Package to Install-Package or pipe the result of Find-Module to Install-Module. Some examples of valid usage:
Find-Module -Name xjea | Install-Module -Verbose Find-Package -Name jquery -ProviderName NuGet -Source http://www.nuget.org/api/v2/ | Install-Package -Destination C:\test -Verbose
Why am I getting a warning saying the module 'sysinternals' cannot be installed or updated because it is not a properly-formed module?
This is likely because you have registered https://chocolatey.org/api/v2/ source with the PowerShellGet provider. PowerShellGet provider only works with http://www.powershellgallery.com/api/v2/ so you will need to register https://chocolatey.org/api/v2/ source with Chocolatey provider via the command:
Register-PackageSource -Name chocolateysource -Location "https://chocolatey.org/api/v2/" –ProviderName Chocolatey