How to remove a package provider

Somehow I ended up with two conflicting nuget package providers. I had to remove them both before it would use the correct one.

    NuGet                  Destination, SkipDependencies, Con

To remove a package provider:

Find the path of the provider, for example:

(Get-packageProvider -name nuget).ProviderPath

Gave this file name:


So -- close Powershell (so that the file is not locked).

Then delete that exe (or move it somewhere else if you're more comfortable with that)

Once I'd removed the first one, this command

(Get-packageProvider -name nuget).ProviderPath

now returned:

C:\Program Files (x86)\PackageManagement\ProviderAssemblies\nuget\\Microsoft.PackageManagement.NuGetProvider.dll

There are several places where PackageProviders can live, see

Either nuget package provider switched from one location to another some time between and or the commands I used when attempting to installed the provider forced the use of specific location.

These are the two different commands I used for installing it

Install-PackageProvider -Name NuGet -Force    

Install-PackageProvider -Name NuGet -MinimumVersion -Force    

I may have used a -ForceBootstrap parameter in there too, just for fun.


See Also

results matching ""

    No results matching ""