[英]Run nuget package manager console from visual studio command prompt
I am looking for a way to startup visual studio and then run some commands in the package manager console for nuget. 我正在寻找一种启动visual studio的方法,然后在包管理器控制台中为nuget运行一些命令。
How can I do the following steps: 我该怎么做以下步骤:
Update-Package MyNamespace.MyProject -Version xxx
调用nuget update语句: Update-Package MyNamespace.MyProject -Version xxx
At first I tried to do this via nuget.exe, but it seems that Install.ps1 scripts aren't executed. 起初我尝试通过nuget.exe执行此操作,但似乎不执行Install.ps1脚本。 ( http://blog.davidebbo.com/2011/05/thoughts-on-installing-and-updating.html ) ( http://blog.davidebbo.com/2011/05/thoughts-on-installing-and-updating.html )
The NuGet FAQ attempts to address this with the " Can I use NuGet outside of Visual Studio? " question, but it falls short of what you are after. NuGet FAQ试图通过“ 我可以在Visual Studio之外使用NuGet吗? ”这个问题来解决这个问题,但它不能满足您的需求。 As you say, the NuGet.exe command line does not run the included powershell scripts in the package you are installing. 如您所说,NuGet.exe命令行不会运行您正在安装的软件包中包含的PowerShell脚本。
It looks like the NuGet team is planning another route to support the new project.json project structure introduced by ASP.Net 5 / ASP.Net Core 1.0 . 看起来NuGet团队正计划另一条路线来支持ASP.Net 5 / ASP.Net Core 1.0引入的新project.json项目结构。
You might be able to use this standalone set of powershell cmdlets developed by the SharpDevelop team, but I haven't tried it and it is a bit old. 您可以使用由SharpDevelop团队开发的这个独立的PowerShell cmdlet集 ,但我还没有尝试过,它有点旧。 But hey, if it works! 但是,嘿,如果有效! :) :)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.