Launch nuget package manager console from visual studio command line

I am looking for a way to start visual studio and then run some commands in the package manager console for nuget.

How to do the following steps:

  • Open visual studio (command line / no gui / silent)
  • Call the nuget update statement: Update-Package MyNamespace.MyProject -Version xxx

At first I tried to do this through nuget.exe, but it seems that Install.ps1 scripts are not executing. ( http://blog.davidebbo.com/2011/05/thoughts-on-installing-and-updating.html )

+5
source share
1 answer

NuGet FAQs help solve this problem. Can I use NuGet outside of Visual Studio? "but that doesn't match what you are after. As you say, the NuGet.exe command line does not run the included powershell scripts in the package you are installing.

It looks like the NuGet team is planning another route to support the new project.json project , presented by ASP.Net 5 / ASP.Net Core 1.0 .

You might be able to use this standalone powershell cmdlet developed by the SharpDevelop team, but I haven't tried it, and it's a bit old. But hey, if that works! :)

+1
source

Source: https://habr.com/ru/post/1239897/


All Articles