我正在尝试构建我的VS2012解决方案,启用Nuget包恢复并收到以下错误
'mono' is not recognized as an internal or external command, operable program or batch file.
也是这个错误
(path to soln nuget folder)\.nuget\NuGet.targets(97,9): error MSB3073: The command "mono --runtime=v4.0.30319 "(path to soln nuget folder)\.nuget\NuGet.exe" install "(path to project folder)\packages.config" -source "" -RequireConsent -solutionDir "(path to root of project)"" exited with code 9009.
知道为什么会失败吗?
答案 0 :(得分:0)
可能,您自己的.targets
个文件之一已重新定义OS
。
寻找<OS Condition="...">...</OS>
。如果你发现这样的条件定义,那么它会混淆NuGet,它希望$(OS)
在Windows上默认返回OS
环境变量的值Windows_NT
。