Blog

Solve basic auth proxy issues with Nuget, Visual Studio and Xamarin (hack)

23 Aug, 2016
Xebia Background Header Wave
When you’re using Visual Studio behind a Basic Authenticaton proxy, you may run into issues restoring Nuget packages. While I’ve never found a real solution for the issue, and trust me I’ve tried quite a few workarounds like the ones listed here.

You’ll get the following error:

[5:06] Download failed. Please download https://dl-ssl.google.com/android/repository/android_m2repository_r29.zip and put it to the C:UsersuserAppDataLocalXamarinXamarin.Android.Support.Design23.3.0.0 directory.
[5:06] Reason: The remote server returned an error: (407) Proxy Authentication Required.

I’ve come to rely on my trusted hacking friend Fiddler and turn on “Automatically Authenticate”.

Optionally configure your upstream proxy in Fiddler:

Restart Visual Studio so it picks up Fiddler as the proxy and you’re good to go. Just leave Fiddler running in the background and all will be well.

Jesse Houwing
Jesse is a passionate trainer and coach, helping teams improve their productivity and quality all while trying to keep work fun. He is a Professional Scrum Trainer (PST) through Scrum.org, Microsoft Certified Trainer and GitHub Accredited Trainer. Jesse regularly blogs and you'll find him on StackOverflow, he has received the Microsoft Community Contributor Award three years in a row and has been awarded the Microsoft Most Valuable Professional award since 2015. He loves espresso and dark chocolate, travels a lot and takes photos everywhere he goes.
Questions?

Get in touch with us to learn more about the subject and related solutions

Explore related posts