【发布时间】:2021-04-04 23:26:18
【问题描述】:
CICD TFS 2013 - Nuget 在 TFS Serer MSbuild 上自动恢复(不在 Visual Studio 中):
我在解决方案文件夹中添加了 NuGet.config 文件。但是在 TFS Build 上自动恢复 NuGet 它不起作用。
错误:
$/Core/testCICD/Webtest/Webtest.sln - 5 error(s), 1 warning(s), View Log File
Default.aspx.cs (8): The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Default.aspx.cs (9): The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Model\Account.cs (1): The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
Model\Account.cs (12): The type or namespace name 'JsonProperty' could not be found (are you missing a using directive or an assembly reference?)
Model\Account.cs (12): The type or namespace name 'JsonPropertyAttribute' could not be found (are you missing a using directive or an assembly reference?)
C:\Program Files (x86)\MSBuild\12.0\bin\amd64\Microsoft.Common.CurrentVersion.targets (1697): Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL". Check to make sure the assembly exists on disk. If this reference is required by your code, you may get compilation errors.
【问题讨论】:
-
您能否更好地格式化您的问题 - 以便将错误代码与您的文本分开?现在很难阅读。
-
这个问题怎么样?下面的答案是否解决了您的问题,如果是,您可以Accept it as an Answer,这样它可以帮助遇到相同问题的其他社区成员,我们可以存档这个帖子,谢谢。