我有一个 Windows 服务器,在该服务器上已成功安装和恢复了我的 dotnet core 项目(当时该服务器具有出站互联网连接)。现在应用程序实例正在良好运行。
现在,由于数据中心政策的原因,已撤销了对外部互联网的访问权限。尽管如此,我仍然拥有 VPN 和远程桌面访问权限。现在,我正在尝试将我的工作项目克隆到一个单独的文件夹中,并创建另一个实例(位于不同的端口)。
但是,当在新的项目文件夹上使用 `dotnet run` (除了一些设置之外,所有内容都相同)时,我遇到了以下错误:
现在,由于数据中心政策的原因,已撤销了对外部互联网的访问权限。尽管如此,我仍然拥有 VPN 和远程桌面访问权限。现在,我正在尝试将我的工作项目克隆到一个单独的文件夹中,并创建另一个实例(位于不同的端口)。
但是,当在新的项目文件夹上使用 `dotnet run` (除了一些设置之外,所有内容都相同)时,我遇到了以下错误:
$ 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.
我检查了 C:\Users\xxxxxx\.nuget\packages
,所有需要的软件包都可用。
这两个项目都在相同的Windows用户配置文件下运行。
我查看了关于这个问题的各种Stackoverflow问题,但它们都涉及代理设置,而这不是我的使用情况。
我如何防止 dotnet
查找远程nuget服务器,因为所有软件包都已经存在于本地缓存中。
是在本地构建dll并在服务器上运行是唯一的选项吗?我不能在我的服务器上离线模式下构建它吗?