This is my first project with .net Core. I am trying to build a self-contained executable but I am getting the following error:
Failed to retrieve information about 'runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy' from remote source ' https://www.nuget.org/api/v2/FindPackagesById()?id= 'runtime.win-x64.Microsoft.NETCore.DotNetHostPolicy'' ...
Error: Response status code does not indicate success: 407 (Proxy Authentication Required (Forefront TMG requires authorization to fulfill the request. Access to the Web Proxy filter is denied)
Obviously, it fails because the firewall denies access to nuget store, but I am not publishing, I am only trying to build the project, so I don't know why it is trying to reach the nuget store.
The command-line used is :
dotnet build -c release -r win7-x64
Any way to avoid this search?
Note: the project uses .NetCore 2.0
You need nuget packages in order to build your project, obviously the simple solution is to add an exception for your firewall but I'm guessing that's not acceptable! Instead you can copy your nuget packages files to your build machine and use --source
option
dotnet build --source c:\packages\mypackages
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.