Visual Studio 2012中的NuGet构建失败 [英] NuGet Build Failure In Visual Studio 2012
问题描述
我在Visual Studio 2012中安装了NuGet 2.1.31002.9028。当我启用包恢复并将任何包(如EntityFramework)添加到我的项目时,在构建项目时出现以下错误:
I've got NuGet 2.1.31002.9028 installed in Visual studio 2012. When I enable package restore and add any package (like EntityFramework) to my project, I get the following error when building the project:
Error 1 The system cannot find the path specified. ConsoleApplication1
Error 2 The command ""D:\Code\ConsoleApplication1\.nuget\nuget.exe" install "D:\Code\ConsoleApplication1\ConsoleApplication1\packages.config" -source "" -RequireConsent -solutionDir "D:\Code\ConsoleApplication1\ "" exited with code -1. ConsoleApplication1
警告3引用的组件'无法找到系统。 ConsoleApplication1
Warning 3 The referenced component 'System' could not be found. ConsoleApplication1
每个引用都有类似上面的警告。 当我从命令提示符运行它时,第二个错误中的命令工作正常。我有"允许
NuGet在构建期间下载丢失的包"检查,我也尝试添加 一个EnableNuGetPackageRestore环境变量,没有一个修复了这个问题。我也没有在我的另一台机器上遇到这个问题,这让它更加令人困惑。
b
我很感激任何帮助,我很乐意提供任何其他信息,如果需要。
There's a warning like the one above for every reference. The command in the second error works fine when I run it from a command prompt. I have "Allow
NuGet to download missing packages during build" checked and I also tried adding a EnableNuGetPackageRestore environment variable, none of which fixed the problem. I also don't get this problem on my other machine, which makes it even more confusing.
I appreciate any help on this, and am more than happy to provide any additional info if needed.
推荐答案
您好vison810,
Hi vison810,
感谢您的帖子。
由于NuGet不是VS2012的默认包,请将您的问题发布在以下论坛:
Since NuGet is not a default package on VS2012, please post your question on the following forum:
http://nuget.codeplex.com/discussions
问候,
这篇关于Visual Studio 2012中的NuGet构建失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!