I updated the Target Framework of all the Projects in my solution from 5.0 to 6.0.
I also had to Upgrade the Target Framework of 2 dependency NuGet packages that I own which are imported from a Releases source in Azure.
After doing this, and adding a step in the Build pipeline to load the correct version of the SDK, I started getting the following error repeated for every project when a step tries to build and run the tests:
F:\BuildAgents\_work\286\s\[Proj Name]\[Proj Name] : error NU1301: Unable to load the service index for source https://pkgs.dev.azure.com/[redacted]/_packaging/Releases/nuget/v3/index.json.
Failed to restore F:\BuildAgents\_work\286\s\[Proj Name]\ [Proj Name] (in 18.5 sec).
Does anyone know what could be causing this? The error code suggests the source is not available but the build step prior successfully adds the source!
The NuGet source:
The updated dependency artifacts which I believe the source uses:
The Pipeline:
The BUILD step BEFORE the error:
This turned out to be some sort of authentication error for the NuGet source.
Why? No idea. The password being stored was correct.
The fix was deleting the password variables in Azure and re-adding them from scratch for each pipeline.