If you’re a Windows stack developer and you’ve just installed the VS2012 Update 2, which came out last week, you may have suddenly started to see this beautifully impenetrable error message whenever you try to debug a web project: “Unable to launch the configured Visual Studio Development Web server. Unable to start debugging. The format of the PE module is invalid.”
A bit of Google-fu confirms there’s a coincidence between installing Update 2 and getting this error.
- http://stackoverflow.com/questions/15575714/unable-to-attach-to-application-the-format-of-the-pe-module-is-invalid
- http://social.msdn.microsoft.com/Forums/en-US/vstest/thread/5682aee9-942b-4c13-9986-178d1b84ea55/
So how do you resolve this?
Solution: Uninstall VS2012 Update 2
It seems heavy-handed but the only way of getting rid of the issue is to uninstall Update 2. While some people are having luck uninstalling VS2012 and then just installing Update 2, skipping Update 1, you still need to get rid of Update 2 somehow. If you don’t have to do a full reinstall of Visual Studio 2012 you need to just wipe off the update.
And that involves a little bit more effort than it should because VS updates are now installed as “Windows Updates” so you won’t find them in your usual Programs list. You need to look at your list of Updates in the Programs and Features menu:
And you’ll find Update 2 sitting under the Visual Studio 2012 list:
Select it and choose Uninstall. When you’ve uninstalled it, you’ll be advised to run a Repair on Visual Studio 2012, for which you’ll have to switch back to the list of Programs to do.
How this got through Microsoft’s QA I’ll never know…