我正在为.Net CI配置TeamCity构建服务器,我似乎无法让NuGet正常工作。
到目前为止,我已完成以下工作:
但我仍然收到以下错误:
C:\TeamCity\buildAgent\work\3bc6f7b8cc834839\.nuget\NuGet.targets(83, 9): Unable to locate 'C:\TeamCity\buildAgent\work\3bc6f7b8cc834839\.nuget\NuGet.exe'
由于我的NuGet构建步骤成功完成,我感到很茫然,但我的实际解决方案构建并没有因为找不到NuGet
我错过了什么?
答案 0 :(得分:12)
您不需要在源代码管理中包含.nuget文件夹中的nuget.exe。 如果您编辑NuGet.target文件的.nuget文件夹 - 您可能已经在源代码管理中包含了该文件夹,那么将在第15行看到它(因此它在我的机器上):
<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">false</DownloadNuGetExe>
将其更改为:
<!-- Download NuGet.exe if it does not already exist -->
<DownloadNuGetExe Condition=" '$(DownloadNuGetExe)' == '' ">true</DownloadNuGetExe>
瞧!
迈克尔
答案 1 :(得分:1)
该路径正在您的存储库的.nuget文件夹中查找nuget.exe。你有源控制中包含的内容吗?