【发布时间】:2017-04-05 12:04:42
【问题描述】:
我之前创建并构建了一个简单的 .net core nuget 包并将其推送到我们的内部 nuget(托管在我们的 VSO 中)。现在我想从另一个核心项目中引用它。这在本地运行良好。
然后我继续定义我的构建。以下是详细信息:
- 代理是“托管 VS2017”
- 进程
- Nuget 安装程序(3.5 版,指向我的解决方案文件,nuget.config 包含我的包源)
- 就是这样!我们永远不会得到任何进一步的
当我运行构建时,我在 Nuget 安装程序位上收到此错误:
[command]C:\a\_tasks\....\NuGet\3.5.0\NuGet.exe restore -NonInteractive C:\a\1\s\...sln -ConfigFile C:\a\1\s\...\nuget.config
Failed to load msbuild Toolset
Could not load file or assembly 'Microsoft.Build, Version=14.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find the file specified.
我尝试过的事情:
- 如果 nuget 版本低于 3.5,我会收到 401 未授权
- 如果 nuget 版本低于 3.5 并且我没有引用 dotnetcore nuget,它可以工作
- 我将自己的凭据添加到 nuget.config 的 packageStoreCredentials 部分,但没有任何效果(我是 VSO 的管理员)
- 我尝试使用 nuget 4,方法是将其 exe 包含在签入中并从 Nuget 安装程序中引用它,但随后我得到“错误:Iac.Repository/nuget.exe failed.spawn Iac.Repository/nuget.exe ENOENT”
感谢您的帮助!
【问题讨论】:
-
您可以分享使用 Nuget 4.0 后的详细构建日志吗?
标签: asp.net-core nuget visual-studio-2017 azure-pipelines