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?
Right-click on Project and select Manage NuGet Packages option. Select the Installed tab from NuGet Package Manager dialog and you can see the installed Syncfusion NuGet packages list by giving the Syncfusion keyword in search. Uninstall the Syncfusion NuGet packages which are not required for the project.
Starting in Visual Studio 2017, use the Tools > NuGet Package Manager > Package Manager Settings menu command, then select Clear All NuGet Cache(s).
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).
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With