I'm using Windows 7 x64 and recently Visual Studio stopped working with nuget.org. Now it reports this error: Unable to read data from the transport connection: An existing connection was forcibly closed by the remote host.
I searched, tried everything from this similar topic: nuget.org: Unable to load the service index
I read this article about Deprecating TLS 1.0 and 1.1 on NuGet.org: https://devblogs.microsoft.com/nuget/deprecating-tls-1-0-and-1-1-on-nuget-org/#ensuring-your-system-uses-tls-1-2
I ensured my system has kb2533552 и kb3140245 installed and also checked the necessary values exist in the registry "HKLM\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client"
Still, after all this I am unable to use the Package Manager. I can access https://apiint.nugettest.org/v3-index/index.json from the browser, but I cannot make the following c# code work - it still throws an exception:
var client = new HttpClient();
string uri = "https://apiint.nugettest.org/v3-index/index.json";
var response = await client.GetAsync(uri);
string msg = "If you see this, your machine has no TLS/SSL issues with nuget.org";
Console.WriteLine(msg);