Visual Studio 2012 throws an error saying: “Visual Studio encountered an unexpected network error and can’t contact the Microsoft account service” when you try to “Create App Packages…” for the Windows Store.
You have developed a Windows Store app and are in the process of building your app package and uploading it to the Windows Store using Visual Studio 2012. During this process, Visual Studio should bring up a dialog that lets you sign-in with your Windows Live Credentials, however you get an error from Visual Studio 2012 that looks like this:
Note: This problem does not seem to happen with Visual Studio 2012 Express version.
One of the reasons you can encounter this issue is if you are trying to deploy your application within a network environment that has a Proxy server which requires Integrated Windows authentication, i.e NTLM/ Negotiate authentication scheme.
Before Visual Studio communicates with the Windows Live service to bring up the sign-in page, it performs a check to see if Windows Live URL can be accessed. It is during this check that the above issue happens because the proxy provides an authentication challenge and Visual Studio is unable to authenticate to the proxy thus resulting in the above error.
By default, Visual Studio is not configured to use your logged on credentials for authenticating with the proxy and you need to explicitly allow Visual Studio do this.
The problem should be resolved once you configure Visual Studio to use your default/ logged on users credentials to authenticate with the Proxy.
To resolve this issue, perform the following steps:
1.) Close all open instances of Visual Studio 2012 running on the machine
2.) Make a copy of the devenv.exe.config file that resides in the Visual Studio installation location. By default, this location is: C:\Program Files (x86)\Microsoft Visual Studio 11.0\Common7\IDE
3.) From an elevated command prompt open the devenv.exe.config file from the above folder
4.) Look for the following section towards the end of the file:
<system.net>
<settings>
<ipv6 enabled="true"/>
</settings>
</system.net>
5.) Add the following line inside the <system.net> section of the file and save the file
<defaultProxy useDefaultCredentials="true" enabled="true" />
6.) Your final setting should look like this:
<system.net>
<defaultProxy useDefaultCredentials="true" enabled="true" />
<settings>
<ipv6 enabled="true"/>
</settings>
</system.net>
7.) Close and restart any open instances of Visual Studio running on the machine
8.) Once Visual Studio is restarted it will pick up the new settings from the changed configuration and if you now try to “Create App Packages…”, you should not longer run into the above issue. Visual Studio should now be able to authenticate through the Proxy using Integrated Windows
authentication (i.e. NTLM/Negotiate authentication scheme) and passing in your default/ logged on users credentials.
Comments are welcome, both below and on twitter: #WSDevSol.
Comments
Anonymous
February 05, 2013
Still got the same problem. Issue has been not solved ..Anonymous
February 08, 2013
The comment has been removedAnonymous
July 14, 2013
I am still getting the error. Is it something to do with any of the updates? I installed update 3 for VS2012 todayAnonymous
October 09, 2013
IT DIDN'T WORKAnonymous
January 27, 2014
I have tried this but it didn't work, however you can do this and it will work: Apply the fix in this post then "Renew Your Developer licence" and all should work fine.Anonymous
February 20, 2014
I did as Rafael and above suggested but still not working. I am able to Renew my developer licence from within visual studio 2013 just fine (login pops up and everything works flawlessly) but trying to create an app package or associate with windows store still throws the same error. I have tried running VS2013 in Admin mode; made no difference. I tried the proxy settings + admin mode, no change. I am not running through a proxy so this shouldn't be the issue to begin with anyways. I am running Windows server 2012 R2 and the only idea that I could come up with is that it might be a vEthernet problem related to hypervisor settings or vEthernet settings caused by the WIndows phone emulator (it automatically creates a switch). I disabled both but still to no avail... I used wireshark to monitor the network traffic and it seems as though packets are being sent between VS2013 and the Microsoft server just fine too. I don't know the exact packets needed by VS2013 but it does do an OAuth logout and does seem to request some sorta of login page. Any more ideas to solve this problem would be awesome :)Anonymous
February 20, 2014
follow up to the previous comment. I am using VS2013 Ultimate edition trial.Anonymous
February 21, 2014
I found the fix to this problem at connect.microsoft.com/.../visual-studio-express-for-windows-8-could-not-able-to-create-app-packages Instead of trying to use the faulty VS2013 studio association and package creation method I uploaded it manually with the above workaround posted. The first field under appxmanifest>packaging should be the 1234developername.appname meantioned in the above guide, the second field (package display name) should the the app's reserved name. Hope this helps someone like it helped me!!!!!!!!Anonymous
September 12, 2014
same is the issue with me as well ............. plz help!! nothing is workin!!Anonymous
October 28, 2014
In my case (on a new PC with a new user account), this error was caused by a hanging redirect from http to https during the login procedure. What you can try: open IE, and go to login.live.com/oauth20_desktop.srf (which is the login that VS tries). I got a warning ("first time use of https, this is safe!") which I accepted ("never show this message again"). After that, VS2013 could connect to the store normally.Anonymous
January 27, 2015
While creating app packages my visual studio is restarting what is the pblm how can i overcome it. Visual studio im using is 2013 update 3Anonymous
November 11, 2015
Facing this issue while using VS 2015 Community Edition. Any solution plz?Anonymous
November 19, 2015
Same problem VS 2015 Community Edition, whats up I paid a developer account fee guys.Anonymous
January 27, 2016
Seeing this in 2015 Community Version. Was working then all of a sudden stopped. I tried the work around in this blog but it didn't help :(Anonymous
January 27, 2016
I had been using VS2015 community seemlessely but all of a sudden getting this error while creating app package.Anonymous
January 27, 2016
That steps didn't worked in VS2015 CommunityAnonymous
January 27, 2016
Also having this same problem in VS 2013 pro and 2015 Community. Trying to uninstall 2015 Community now and install 2015 update 1 community.Anonymous
January 27, 2016
Me too. I have been using VS2015 community seamlessly but all of a sudden getting this error while creating app package. Looks like there is a bunch of us that started having the same problem after Jan 27. I suspect it was the latest OS upgrade which I just run that cause the issue. Please post here if you find a solution!Anonymous
January 27, 2016
Facing the same issue here (On VS2015 community). I have been creating app packages before without a hitch but all of a sudden today it starts throwing the error above!! Somebody kindly helpAnonymous
January 27, 2016
Got that problem today, I also could do create packages in past, today I can'tAnonymous
January 27, 2016
Confirming the same issue - until yesterday everything was working perfectly on VS2015 community. Today is not possible to access the store and generate packages. At this point I suspect it is kind of issue with the MS Account service itself and not a local issue.Anonymous
January 28, 2016
Same problem here. We detected the issue today. Last week, when we created the last package, everything was working just fine.Anonymous
January 28, 2016
Ialso have ths issue on VS2015 Community. It worked fine yesterday but today it fails.Anonymous
January 28, 2016
Now after reinstalling 2015 community I still can't create packages. The error comes right after it tries to load the list of app names on my account. I can however sign into Visual Studio with my account. Seems like we all got the same problem - can someone explain or escalate?Anonymous
January 28, 2016
Same problem, started yesterday, 1/27/2016!Anonymous
January 28, 2016
Glad we found this. We were about to start looking for things to do to our dev boxes. I suspect it is on the Microsoft Service side. We'll wait for verification that it is up and running properly again. Meanwhile, we will just keep polishing. :)Anonymous
January 28, 2016
Hey! It seems to be fixed now, at least I was able to create an app package in VS 2015U1 just now. :)Anonymous
January 29, 2016
Yep, this morning when we got into the office, everything was back to normal. We uploaded a new package update.