Aaron Stebner's WebLog

Thoughts about setup and deployment issues, WiX, XNA, the .NET Framework and Visual Studio

How to fix compatibility mode error that can appear when installing Windows Phone Developer Tools or Visual Studio 2010

How to fix compatibility mode error that can appear when installing Windows Phone Developer Tools or Visual Studio 2010

Rate This
  • Comments 53

I have heard from a few people who tried to install the final release of the Windows Phone Developer Tools but get an installation error like the following:

Visual Studio setup cannot run in compatibility mode.
For more information see the 'Installing' section in the Visual Studio readme at http://go.microsoft.com/fwlink/?LinkID=143397.

The link in the error message points to the Visual Studio 2010 readme because this issue can affect all editions of Visual Studio 2010, including WPDT.  Item 2.1.10 in that readme provides a workaround for this issue.  In my past experience, that workaround has proven to be incomplete though, so here are some updated steps that usually help solve this type of error:

  1. Click on the start menu, choose Run, type regedit and click OK.
  2. Browse to each of the following keys and delete any value that refers to the WPDT setup program (named vm_web.exe):

    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted
    HKEY_CURRENT_USER\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Compatibility Assistant\Persisted
    HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows NT\CurrentVersion\AppCompatFlags\Layers

If the above doesn’t help, then you can also try to save vm_web.exe to your computer and run it from there.  When compatibility mode is triggered by Windows, it is based on a full path to the setup executable, so if you save it to a different location than you previously tried to run it from and then run it again, that can help avoid triggering compatibility mode.

  • Renaming the file solves the trick. I had the same problem, VS2010 was opened when I tried to install. I got a message that I need to close VS and when I did that I could not rerun the .exe. I copied the file and rant it again, I'm reinstalling as I type this. Thanks!

  • Thank you very much, turns out just dragging the file onto my desktop sorted it, I feel like such an idiot now.

  • Thank you very much!!!

  • Hello alan. i have a problem installing my visual studio 2010 and i can't find vm_web.exe from the directions you have posted.

  • Hi Katrina - The file will only be named vm_web.exe if you are trying to install the Windows Phone SDK.  If you are installing another Visual Studio edition, the name will be the name of the setup executable of the edition that you are trying to install.  I'd suggest looking for any Visual Studio edition names in those Application Compatibility registry keys and deleting them, or copying your Visual Studio installer to a different location and running it from there instead.

  • its works in 5 min thnx alot !

  • You are a hero!. I love it when a simple suggestion saves two days work. Tried everything and your simple 'save to different dir to prevent compatibility mode problem' did the trick. Thumbs up!

  • For me copying the vm_web2.exe file to C: drive fixed the problem. No need to mess up with the registry.

  • Thanks Kashif_Imran. It worked for me too. I just copied the file in C drive.

  • thanks alot for the help! :)

  • Downloaded, Renamed it to vm_web1, it worked.  Thanks  

    Windows 7 - 64 bit

  • Deleting correspodning entries did not worked. But thanks Aaron for your valuable idea to download and rename the file.

  • Just Goto "Setup folder" inside the VS Setup folder

    run setup.exe from inside that folder.

    you will have no error.

    The error appears when you install from the root folder.

    Happy Programming

  • TNX :D

  • Thanks Kashif_Imran, it worked for me :)

Page 3 of 4 (53 items) 1234
Leave a Comment
  • Please add 1 and 8 and type the answer here:
  • Post