Visual Studio 2019 16.11.3 not pulling NuGet packages from TeamCity 2021.1 (build 92597)
On Windows Server 2016 (1607)
We're in the process of moving to new development machines. On these new machines, attempting to Restore NuGet packages from the TeamCity repository fails. It only fails when using the TeamCity-maintained repository, we do have a UNC share too, which works fine. The message we receive:
NuGet Package restore failed for project xxx.yyy.TestHarness.Windows.Console: Unable to find version '1.0.98' of package 'xxx.Infrastructure.zzz'.
\\ourteamcitybuildserver.vvv.local\NuGetFeed_Public: Package 'xxx.Infrastructure.zzz.1.0.98' is not found on source '\\ourteamcitybuildserver.vvv.local\NuGetFeed_Public'.
C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\: Package 'xxx.Infrastructure.zzz.1.0.98' is not found on source 'C:\Program Files (x86)\Microsoft SDKs\NuGetPackages\'.
https://api.nuget.org/v3/index.json: Package 'xxx.Infrastructure.zzz.1.0.98' is not found on source 'https://api.nuget.org/v3/index.json'.
http://ourteamcitybuildserver.vvv.local:8083/guestAuth/app/nuget/feed/_Root/default/v3/index.json: Package 'xxx.Infrastructure.zzz.1.0.98' is not found on source 'http://ourteamcitybuildserver.vvv.local:8083/guestAuth/app/nuget/feed/_Root/default/v3/index.json'.
http://ourteamcitybuildserver.vvv.local:8083/guestAuth/app/nuget/feed/_Root/default/v2: Package 'xxx.Infrastructure.zzz.1.0.98' is not found on source 'http://ourteamcitybuildserver.vvv.local:8083/guestAuth/app/nuget/feed/_Root/default/v2'.
https://ourteamcitybuildserver.zzz.local:8085/guestAuth/app/nuget/feed/_Root/default/v2: Package 'xxx.Infrastructure.zzz.1.0.98' is not found on source 'https://ourteamcitybuildserver.vvv.local:8085/guestAuth/app/nuget/feed/_Root/default/v2'.
We've obfuscated with xxx, yyy, zzz and vvv.
This _used_ to work fine on our old machines. With differing versions of VS 2019 from 16.1.5 to 16.11.3. In our investigations, we're using all 3 supported versions of the NuGet feed URL.
We use SSL so have IIS as a Reverse Proxy (providing the SSL) on 8085, which proxies to TeamCity's 8083. We can access 8085 and 8083 using web browsers and the Fiddler tool and get valid results. But Visual Studio fails to restore.
Please advise if there's anything else I can provide. This appears to be specific to Visual Studio communicating with the TeamCity NuGet repo. It communicates with NuGet fine. We are able to prove communication outside of the Visual Studio flow fine. It fails using PackageReference or packages.config methods.
Thank you for your time.
Nathan
Please sign in to leave a comment.
More information:
NuGet version 5.1 WORKS
NuGet version 5.11.0, 6.0.0.275 does NOT work.
A colleague is reporting the following:
Restarting server didn't fix.
Using Rider 2021.2.2 also has issue.
You can see the communication on HTTPS/8085 going to HTTP/8083 based on the feed response, which contains the HTTP/8083 URLs.
Fixed this.
FLushed the buildArtefacts cache despite restarts, a yellow banner and constant Googling not turning anything up.