monodevelop-nuget-extensions icon indicating copy to clipboard operation
monodevelop-nuget-extensions copied to clipboard

Uninstall-Package - Argument cannot be null.

Open omares opened this issue 9 years ago • 3 comments

When trying to remove an existing nuget package from a project i get following input:

PM> Uninstall-Package FAKE
Removing ...
Argument cannot be null.
Parameter name: packageId

Am i missing something?, or is this an error?

Running the package manager console using:

Xamarin Studio
Version 5.9.3 (build 1)
Runtime:
    Mono 4.0.1 ((detached/ed1d3ec)
    GTK+ 2.24.23 (Raleigh theme)

    Package version: 400010044

Operating System
Mac OS X 10.10.3

omares avatar Jun 25 '15 10:06 omares

The error seems to be misleading. If I try the same thing with SharpDevelop it shows a better error message which is that it cannot find the FAKE package. In Xamarin Studio I get the argument cannot be null error if I try to uninstall a NuGet package that is not installed, which is a bug.

The problem is that the Fake NuGet is a solution level package which is not installed into a particular project. Currently Xamarin Studio does not have good support for these types of NuGet packages. It currently only looks at the project. You cannot uninstall these types of NuGet packages directly from Xamarin Studio using the built in support either.

I will look at adding support for these types of NuGet packages into the package manager console.

mrward avatar Jun 25 '15 11:06 mrward

Thank you :+1:

omares avatar Jun 25 '15 12:06 omares

Version 0.9 of the NuGet extensions has been published and it supports uninstalling solution level NuGet packages. There is one limitation on the Mac currently where the package id passed to Uninstall-Package needs to match the case of the package id used in the .nupkg file. So Uninstall-Package fake does not work and will fail to find the NuGet package, but Uninstall-Package FAKE will work.

mrward avatar Jun 28 '15 13:06 mrward