tfs build failing on dotnet restore for .net 6 after upgrading

419 Views Asked by At

We're currently in the process of upgrading our solutions to .net 6 and seem to be running into a problem. we have a powershell step that runs a dotnet restore and its failing now on .net 6 the error we are getting is: Failed to download package 'Microsoft.AspNetCore.Mvc.NewtonsoftJson.6.0.0' from 'https://api.nuget.org/v3-flatcontainer/microsoft.aspnetcore.mvc.newtonsoftjson/6.0.0/microsoft.aspnetcore.mvc.newtonsoftjson.6.0.0.nupkg'. The token supplied to the function is invalid

I'm worried this is a red herring as there is no issue with nuget for the 2 branches with the older versions of .net running.

I've logged into the build server and run the dotnet restore in the build folder manually and it completes and opened the code with visual studio 2022 on there also and it again builds successfully.

0

There are 0 best solutions below