The instructions have been tested on Visual Studio 2010, 2012, 2013, and 2015.
In VS 2010, extension manager is part of a nice new generation of VS plug-in system. One of the great features of it is how it can go online talk to Microsoft Visual Studio Gallery website to retrieve list of extensions there, automatically discovering updates for installed extensions, and allowing me to add new extensions directly from within Visual Studio.
However, in my company I could not take benefit of that for long time. Reason is, the company uses Blue Coat proxy, with some active directory based authentication. We cannot access the Internet unless we use that proxy, no direct connection allowed, most other proxies are also blocked (by blocking the common proxies port 8080 and many other common ports).
Although I have the proxy set in Internet Explorer, and I have the username/password stored in my Windows Credentials store (Start–> Run–> Control PanelAll Control Panel ItemsCredential Manager) -since my primary work laptop and user account on it are not part of the company domain-, Visual Studio did not seem to be able to use that.
Anything that requires online communication not directly using the browser is not working. The main feature missed by this is Extensions Manager integration with the Visual Studio Gallery online.
Another side effect of the problem was when running tests with TestDriven.NET test runner (running using Debugger or In-Process), as I had some tests that required connecting to online websites.
It turns out (just by guessing and trial-error way) that the default proxy settings for .NET apps is for some reason not to use the system proxy and credentials. Visual Studio will be default ignore that proxy (and many other .NET applications will).
Thanks God, .NET applications have a nice extensibility feature for things like this using the app.config file (if it was unmanaged application, I’d have no way to it).
Troubleshooting this issue in TestDriven.NET was what inspired me to get this, as I was trying to setup the credentials in the app.config file of the test project and then in Visual Studio.
So, I needed to setup the proxy settings in the Visual Studio config file., Knowing the Visual Studio IDE executable “devenv.exe”, the file I’m looking for is “devenv.exe.config”. I didn’t need to create that file (which is easy, just a standard .config file with the same name as the executable including “.exe”) because Visual Studio already has a config file with bunch of existing configuration defaults.
I want to the Visual Studio 2010 shortcut in Start-> All Programs, right clicked it, then chose “Properties”.
In the following properties Window, I clicked “Open file Location”:
This took me to the Visual Studio folder that has the “devenv.exe” and “devenv.exe.config” files:
I opened this file in Visual Studio (yes, it’s OK – the effected showed after restarting VS of course):
The section I was looking for is under “<system.net>”. The config file already had this section to enable IPv6 (which is not enabled by default, yet another interesting default and override – I commented the override anyway later).
I modified it with this simple change:
The complete XML for copy-paste sake:
As you can see, this is very simple. It enables the proxy, tells Visual Studio to use the system (IE) oroxy, and to use the default credentials for that.
This was all required to do the trick. You just need to close Visual Studio and re-run it afterwards to take effect.
Hopefully this saves someone else facing a similar issue…
How did I learn that?
As a bonus for coming here, I'm giving away a free newsletter for web developers that you can sign up for from here.
It's not an anything-and-everything link list. It's thoughtfully collected picks of articles and tools, that focus on Angular 2+, ASP.NET (4.x/MVC5 and Core), and other fullstack developer goodies.
Take it for a test ride, and you may unsubscribe any time.
You might also want to support me by checking these out [Thanks]: