Nuget Restore via build server “unable to find version”

后端 未结 6 2138
执念已碎
执念已碎 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:07

    According to THIS current document as of this writing from MS, the proper url is: https://api.nuget.org/v3/index.json

    So I went about to fix the issue because I assumed it had nothing to do with the URL. I did 2 things, not sure which it was that resolved the issue but I'll post both here in case it helps someone.

    • Within TFS2018 and within my build step for the installation of Nuget I specified version 4.9.3 (the reason I chose 4.9.3 because I noticed by looking at detailed log of VS that during my build it was using this version) and chose to always download the latest version.

    • Second thing I did was I removed a Nuget.Config file from my project that was left over from something I was testing. Then I re-commited my changes to TFS

    After I did both of the above steps the rest of my build started working.

提交回复
热议问题