Is it possible to set proxy in VS 2022?

Ehsan 41 Reputation points
2022-10-24T05:39:42.613+00:00

I need to know if it is possible to set a proxy in VS 2022 to connect to internet through that? Where could I add the config in Visual Studio 2022?
(Some thing like Firefox that we add 127.0.0.1:12345 in network to connect through that tunnel to filtered internet)

Developer technologies | Visual Studio | Other
{count} votes

2 answers

Sort by: Most helpful
  1. Anna Xiu-MSFT 31,056 Reputation points Microsoft External Staff
    2022-10-24T10:34:50.17+00:00

    Hi @Ehsan ,

    Welcome to Microsoft Q&A!

    In VS2019, there is an option(Tools > Options > Environment > Web Browser) to configure proxy settings.

    But in VS2022, the feature is removed. You can try to directly set proxy in your Internet Explorer:
    open your IE from Start > Tools(Alt + X) > Internet options > Connections > LAN settings > Proxy server > check “Use a proxy server for your LAN (These settings will not apply to dial-up or VPN connections).” > Advanced.

    Sincerely,
    Anna
    *
    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    1 person found this answer helpful.

  2. Carrasco, Juan Pablo 1 Reputation point
    2022-11-18T16:04:56.117+00:00

    Hello -- I had similar problem, I was unable to get NuGet packages, error I was getting was: Unable to load the service index for source https://api.nuget.org/v3/index.json --- It was fixed by adding proxy details on NuGet configuration:

    I have executed nuget.exe config -set http_proxy=http://company-squid:3128 as per indicated on this blog I've found: http://skolima.blogspot.com/2012/07/nuget-proxy-settings.html by replacing the proxy address by the one I have

    Extra consideration: I wasn't able to execute Nuget command so I had to install thru Chocolatey with command choco install Nuget.CommandLine -- after that, I was able to run the config command

    After command execution I could see a new section was added to NuGet.config file on %AppData%\Roaming\NuGet\NuGet.Config --

    Restarted VS, and it took few seconds, and then it was able to get packages

    My config:

    • Win 11 - 21H2
    • VS2022 - 17.3.6
    • proj Target Framework net6.0

    Hope this helps
    JP

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.