VS 2019 Publish issue - Unable to load the service index for source https://api.nuget.org/v3/index.json

Solution 1:

Fixed it in Windows 7 by doing these steps, outlined in Support Article:

Step 1

Add a DWORD registry entry called DefaultSecureProtocols with a value of 0x00000a00 to:

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp
HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Internet Settings\WinHttp

Note: Second one (in Wow6432Node) is needed only on 64-bit Windows.

Step 2

Created sub keys:

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.1\Client
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\SecurityProviders\SCHANNEL\Protocols\TLS 1.2\Client

In each of them add a DWORD entry called DisabledByDefault with a value of 0.

Note: You may need to create the TLS 1.x key and also the Client key.