I have a Windows server in which I installed and restored my dotnet core project successfully (at the time when I had outbound internet connection on the server). This instance of the application is running fine now.
Now Outbound internet access has been revoked as part of data center policy. I have VPN and Remote Desktop access, though. Now, I am trying to clone my working project into a separate folder and create another instance (on a different port).
But when using dotnet run
on my new project folder (all content except few settings are same), I am getting this error:
$ dotnet run
C:\Program Files (x86)\dotnet\sdk\2.2.102\NuGet.targets(114,5): error :
Unable to load the service index for source https://api.nuget.org
/v3/index.json. [C:\xxxx\xxxx\xxxx.csproj]
C:\Program Files (x86)\dotnet\sdk\2.2.102\NuGet.targets(114,5): error :
A connection attempt failed because the connected party did not properly
respond after a period of time, or established connection failed because
connected host has failed to respond [C:\xxxx\xxxx\xxxx.csproj]
The build failed. Please fix the build errors and run again.
I checked C:\Users\xxxxxx\.nuget\packages
and all required packages are available.
Both projects are running under the same Windows user profile.
I have looked up various Stackoverflow questions on the subject, but all of them talk about a proxy setting, which is not my use case.
How can I prevent dotnet
from looking up remote nuget server as all packages are already available in the local cache.
Is building the dll locally and running on server the only option? Cant I build it on my server in offline mode?