简体   繁体   English

Nuget自动软件包还原在命令行上失败

[英]Nuget Automatic Package Restore fails on command line

I have migrated my MSBuild-Integrated solution into Automatic Package Restore. 我已经将集成MSBuild的解决方案迁移到“自动程序包还原”中。 It works on Visual Studio but when I try running the command 它适用于Visual Studio,但是当我尝试运行命令时

nuget restore Path/To/MySolution.sln

(I try doing that in my Package Manager console as well as in my Jenkins "Windows batch command" build step) (我尝试在Package Manager控制台以及Jenkins的“ Windows批处理命令”构建步骤中执行此操作)

but in those cases I get an error The solution file has two projects named "1_2". 但是在这些情况下,我会收到错误消息解决方案文件有两个名为“ 1_2”的项目。

I cannot find these projects in my solution. 我在解决方案中找不到这些项目。 Any ideas? 有任何想法吗?

Sorry for not answering before but I ended up finding out that the solution had two websites created from the local IIS and they ended with a version number that was the same. 抱歉,以前没有回答,但最终我发现该解决方案有两个通过本地IIS创建的网站,并且它们的版本号相同。 Visual Studio named the project with this end only, which made this solution with two 'projects' with the same name. Visual Studio仅为此目的命名该项目,这使得该解决方案使用两个具有相同名称的“项目”。 I could see it by looking in the sln file. 我可以通过查看sln文件来看到它。 Looks like VS does not treat this edge case :-/ 看起来VS不处理这种情况:-/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM