.net nuget 安装退出代码 9009

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/15097538/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-03 12:08:52  来源:igfitidea点击:

nuget install exit code 9009

.netvisual-studiobuildnuget

提问by Nick Hotalling

When build my solution, I got an error:

在构建我的解决方案时,我收到一个错误:

Error 116 The command "nuget install “C:\Mycode\Test\some\ClassLibs\WCF\ServiceHosts\Monitor\packages.config” -o “C:\Mycode\Test\Some\ClassLibs\WCF\ServiceHosts\Monitor\packages.config”" exited with code 9009

错误 116 命令“nuget install “C:\Mycode\Test\some\ClassLibs\WCF\ServiceHosts\Monitor\packages.config” -o “C:\Mycode\Test\Some\ClassLibs\WCF\ServiceHosts\Monitor\packages .config””以代码 9009 退出

I use VS 2012, Thanks.

我使用 VS 2012,谢谢。

采纳答案by Richard J Foster

Error 9009 means that Visual Studio cannot find an executable - typically one used in a pre or post build step. In this instance, it seems that NuGet is the source of the problem.

错误 9009 意味着 Visual Studio 找不到可执行文件 - 通常是在构建前或构建后步骤中使用的。在这种情况下,NuGet 似乎是问题的根源。

Is it possible that you are using a solution that manages dependencies using NuGet (and probably has the "Enable NuGet package restore" option enabled), but you haven't yet loaded the NuGet extension into Visual Studio 2012?

您是否可能正在使用使用 NuGet 管理依赖项的解决方案(并且可能启用了“启用 NuGet 包还原”选项),但您尚未将 NuGet 扩展加载到 Visual Studio 2012 中?

To confirm if this is the case, go to the Tools menu, and click "Extensions and Updates", select installed and type nugetReturninto the search box at the top right corner of the Extensions and Updates form. If it's installed, you should see it listed with a version number - for example 2.4.40116.9051 which I believe is the most recent release as I type this. If you don't find it, select "online" from the list on the left hand side of the Extensions and Updates form. Locate the NuGet Package Manager entry (quite possibly the first item on the list) and click "download" to grab it.

要确认是否是这种情况,请转到“工具”菜单,然后单击“扩展和更新”,选择已安装并nugetReturn在“扩展和更新”表单右上角的搜索框中键入内容。如果它已安装,您应该会看到它列出了一个版本号 - 例如 2.4.40116.9051,我认为这是我输入的最新版本。如果找不到,请从“扩展和更新”表单左侧的列表中选择“在线”。找到 NuGet 包管理器条目(很可能是列表中的第一项)并单击“下载”以获取它。

回答by Nick Hotalling

To resolve the 'nuget exited with code 9009' error, I downloaded the newest version of NuGet.exe (https://www.nuget.org/downloads) and placed it in the C:\Windows directory so Windows could find the executable.

为了解决“nuget exited with code 9009”错误,我下载了最新版本的 NuGet.exe ( https://www.nuget.org/downloads) 并将其放在 C:\Windows 目录中,以便 Windows 可以找到可执行文件.