Dotnet Core Nuget set proxy

14,977

Installing nuget from this post and running the appropriate commands supported the workaround.

NuGet Behind Proxy

Would still like to see those commands integrated into dotnet coret.

Share:
14,977
ffejrekaburb
Author by

ffejrekaburb

Updated on June 26, 2022

Comments

  • ffejrekaburb
    ffejrekaburb almost 2 years

    I'm running dotnet core 2.2, and I would like set a proxy as I receive this when running dotnet restore:

    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:\Projects\FarrisCosting\Projects.csproj]

    Per another post, these commands are possible:

    nuget.exe config -set http_proxy=http://my.proxy.address:port
    nuget.exe config -set http_proxy.user=mydomain\myUserName
    nuget.exe config -set http_proxy.password=mySuperSecretPassword
    

    Using the dotnet core conventions I would expect to have the following available: dotnet nuget config -set, but this does not appear to be available.

    I'm wondering if I may need to run nuget directly from the SDK without encapsulation?