Nuget Restore via build server “unable to find version”

后端 未结 6 2268
执念已碎
执念已碎 2021-02-06 21:38

I have a VS solution and as part of a TeamCity Build, we restore packages from both a private NuGet feed (myget) and the public feed (nuget.org). Most packages restore fine, but

6条回答
  •  我寻月下人不归
    2021-02-06 22:24

    I followed this: https://blogs.msdn.microsoft.com/tfssetup/2017/04/18/tfs-2017-update-1-nuget-restore-task-always-fails-trying-to-find-packages-even-though-they-exist-on-the-feed/

    I had tried 3.3 and got this error:

    Restoring NuGet package Microsoft.AspNet.WebPages.3.2.3. WARNING: Unable to find version '3.5.0.2' of package 'Antlr'.

    I downloaded the latest NuGet 4.3.0.4406 and set the Custom path to NuGet and that failed as well.

    Surprisingly when I switched to 3.5 it worked.

    If you are really stuck, run the command in a Command Line Prompt and it will work:

    C:\Program Files (x86)\NuGet\nuget.exe restore -NonInteractive E:\agentXYZPool\_work\1\s\xyz.sln
    

提交回复
热议问题