New work laptop, new installs of both Visual Studio 2019 and 2022. My team work on a mix of projects, mostly in VS2019, but we have a new project this year that's being written in 2022. I have full admin rights on my laptop, and open both versions of VS with as an administrator.
I downloaded a clean copy of the VS2022 solution from source control to my new laptop (containing several project types, api, web, domain etc.) aimed at creating an Azure web application, but noticed out of the nine projects, two had issues with the dependencies:
As this was a new laptop, using package manager in VS, I tried update one or more packages. I runs through checking each project/package until it reaches one of the projects that has the issue, then breaks with the following error:
RestoredC:\TFS_Workspaces\SDRnD\Main\Source\Tests\SDRnD.Application.Tests\SDRnD.Application.Tests.csproj(in 144 ms). Failed to download package'System.Runtime.CompilerServices.Unsafe.6.0.0' from'https://api.nuget.org/v3-flatcontainer/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg'.Unable to read data from the transport connection: An existingconnection was forcibly closed by the remote host. An existingconnection was forcibly closed by the remote host Failed todownload package 'System.Runtime.CompilerServices.Unsafe.6.0.0' from'https://api.nuget.org/v3-flatcontainer/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg'.Unable to read data from the transport connection: An existingconnection was forcibly closed by the remote host. An existingconnection was forcibly closed by the remote host Failed todownload package 'System.Runtime.CompilerServices.Unsafe.6.0.0' from'https://api.nuget.org/v3-flatcontainer/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg'.Unable to read data from the transport connection: An existingconnection was forcibly closed by the remote host. An existingconnection was forcibly closed by the remote host Failed todownload package 'System.Runtime.CompilerServices.Unsafe.6.0.0' from'https://api.nuget.org/v3-flatcontainer/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg'.Unable to read data from the transport connection: An existingconnection was forcibly closed by the remote host. An existingconnection was forcibly closed by the remote host Failed todownload package 'System.Runtime.CompilerServices.Unsafe.6.0.0' from'https://api.nuget.org/v3-flatcontainer/system.runtime.compilerservices.unsafe/6.0.0/system.runtime.compilerservices.unsafe.6.0.0.nupkg'.Unable to read data from the transport connection: An existingconnection was forcibly closed by the remote host.
An existing connection was forcibly closed by the remote host
Failed to restore C:\TFS_Workspaces\SDRnD\Main\Source\SDRnD.Api\SDRnD.Api.csproj(in 10.37 sec).
Failed to restore C:\TFS_Workspaces\SDRnD\Main\Source\Tests\SDRnD.Architecture.Tests\SDRnD.Architecture.Tests.csproj(in 10.37 sec).
NuGet package restore failed.Please see Error List window for detailed warnings and errors.
I've tried creating a simple project in both VS2019 and VS2022, and installing the same package and get the same error. If I install version 5.0.0 of the package, that works, but the update to 6.0.0 fails.
My two colleagues have the same (new) laptops, same OS, same versions of VS, and neither have this issue with this solution/project and are able to update without issue.