【发布时间】:2015-09-30 09:06:53
【问题描述】:
更新: 因此,我登录到服务器并使用 VS 2013 打开项目。我单击了解决方案上下文菜单上的“启用 nuget 包还原”。现在,它建立在服务器上。问题是,我不知道如何在 VS 2015 中做同样的事情。没有右键菜单。我已经在选项中启用了“允许自动包恢复”。 -结束更新
我在 Visual Studio 2015 中有一个项目。我可以在本地计算机上成功构建和运行它。它使用从 Nuget 获得的 Newtonsoft.Json (JSON.net)。当我签入并且我的持续集成构建在构建服务器上运行时,它会引发一个异常,它无法找到 JSON.net 程序集:
The type or namespace name 'Newtonsoft' could not be found (are you missing a using directive or an assembly reference?)
C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Microsoft.Common.targets (1605): Could not resolve this reference. Could not locate the assembly "Newtonsoft.Json, Version=7.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.
我已经查看了所有导致 Nuget 包失败的原因。是因为我使用的是 Visual Studio 2015 吗? Nuget 被顶起来了吗?
有人遇到过这个问题吗?
【问题讨论】:
标签: json.net nuget visual-studio-2015 tfsbuild