问题描述
在执行恢复我的解决方案的 NuGet 包的命令期间,Bamboo 构建服务器上发生此错误.我可以通过禁用包还原任务来绕过这个错误;但是,这只是一个临时修复.有什么方法可以在运行任务时检查依赖项是否存在?此错误发生在 MSBUILD 运行之前.我正在使用 .NET 4.5
This error occurs on the Bamboo build server during a command that restores my solution's NuGet packages. I can bypass this error by disabling the package restore task; however, this is only a temporary fix. Is there any way I can check if the dependency exists while running the task? This error occurs before MSBUILD is running. I am using .NET 4.5
推荐答案
安装 NuGet 包时,already has a dependency defined for
错误是由于 旧版本 NuGet 中的错误.
The already has a dependency defined for
error when installing a NuGet package is due to a bug in older versions of NuGet.
您应该考虑在构建服务器上更新 NuGet,或者运行您自己的构建步骤,该步骤使用您单独下载或部署的 NuGet 版本.
You should look at updating NuGet on the build server or run your own build step that uses a version of NuGet that you download or deploy separately.
这篇关于“Portable.BouncyCastle"已经为“System.Collections"定义了一个依赖项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!