Reputation: 54140
I'm working on a NuGet package that installs a bunch of content - views, scripts, CSS files - into a web application, and trying to improve the change-compile-test cycle. I have two projects - the framework itself ("Package") and the demo web app that consumes it ("Website")
What I need to do as part of the Visual Studio build process is:
The problem is - there doesn't seem to be any command-line equivalent of doing Uninstall-Package
from the NuGet Package Manager console. Am I missing something?
Upvotes: 17
Views: 6503
Reputation: 47937
There is a way but using neither Visual Studio nor NuGet.exe. Using a custom build of SharpDevelop you can install and uninstall NuGet packages from the command line and have their PowerShell scripts run.
This custom build of SharpDevelop and its NuGet addin allows you to run the commands, such as Install-Package and Uninstall-Package, from PowerShell but outside of Visual Studio.
The limitations are that it needs SharpDevelop to be available and it also does not support any PowerShell scripts that are Visual Studio specific.
Upvotes: 2
Reputation: 14810
No there isn't currently.
Also, nuget.exe install
doesn't really install anything. What nuget.exe install
really does is nuget.exe restore
: it restores the extracted package in the output directory. It doesn't run the PowerShell hooks (e.g. install.ps1) and it doesn't modify any target project (as there's none being targeted).
Upvotes: 11