Partilhar via


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

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 https://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.

Comments

  • Anonymous
    September 24, 2010
    Any more ideas, Aaron?I've tried all the steps above but still cannot get vm_web.exe to install.  I have also tried running setup.exe from vm_web.exe and verified that compatibility was not checked and that also failed.My system is Win7 64-bit, VS 2010 Premium and no previous versions of Win Phone SDK installedThanks,Phong

  • Anonymous
    September 24, 2010
    Hi Phong - If you're still getting a compatibility mode error, I'd suggest using regedit to search your entire registry for "vm_web.exe" to see if there are other locations where that is being stored.  If that doesn't help, then I'd suggest saving vm_web.exe to your hard drive, renaming it to something else (the exact name doesn't matter) and running it again after renaming it.

  • Anonymous
    December 10, 2010
    This post saved my day. Thank you very much

  • Anonymous
    December 18, 2010
    The comment has been removed

  • Anonymous
    January 07, 2011
    The comment has been removed

  • Anonymous
    January 07, 2011
    Hi Erik Reppen - What probably happened in this scenario is that when you exited setup after it told you that VS 2008 was open, a dialog appeared that said that the setup didn't appear to complete successfully.  If you clicked Yes on that dialog, it will cause future attempts to run that installer to launch in compatibility mode, which will then trigger the error in this blog post.  Compatibility mode is stored in the registry based on the full path to the setup program, so it will appear every time you launch setup from the same location as it was originally launched from.  Renaming or moving the file will cause the path to be different so it won't trigger the compatibility mode dialog.I've reported a bug to the WPDT setup team about that files in use dialog not allowing the user to retry.  Hopefully this is something that will be investigated for a future release of WPDT.

  • Anonymous
    February 05, 2011
    Hey, I would just like to additionally add that I had the same problem as Erik Reppen but with Visual Studios 2010. I downloaded the setup to my desktop, ran it, had installation quit because VS2010 was open, then had all subsequent install attempts throw that error. Moving the setup to a different directory solved the problem. I agree that it is pretty weak on Microsoft's part to not allow you to close VS and continue the installation from that point once the program is called.Just wanted to make sure that if anyone else runs into this problem they try this.

  • Anonymous
    February 05, 2011
    Hi Brennan R - Thanks for posting about your experience.  The issue described in this blog post can affect all Visual Studio 2010 editions, including the Windows Phone Developer Tools.  Moving the setup program to a different directory should solve this issue because the Windows compatibility assistant uses the full path to a program when it decides whether or not to run in compatibility mode, and moving the setup program causes the full path to no longer match what is stored in the registry.

  • Anonymous
    February 19, 2011
    Your ret edit updates worked and saved me from wasting more time.Had the compatibility mode removed from vm_ware.exe to run uninstall.Thanks,

  • Anonymous
    February 22, 2011
    I tried everything < I just can't get visual studios to download?? Dang,,,

  • Anonymous
    February 22, 2011
    Hi ZCerritos College - Are you getting an error downloading or installing?  If it is a download error, I'd suggest trying to use the ISO file at download.microsoft.com/.../WPDT_RTM_en1.iso instead of using the web download bootstrapper (vm_web.exe).If it is an install error, please use the tool described at blogs.msdn.com/.../6458047.aspx to collect all of your setup log files, upload the file named %temp%vslogs.cab that will be created by that tool to a file server (such as http://skydrive.live.com), then reply back here and provide a link I can use to download your log files and take a further look.

  • Anonymous
    April 03, 2011
    The comment has been removed

  • Anonymous
    April 03, 2011
    The comment has been removed

  • Anonymous
    April 04, 2011
    Thank you!!!It works now - I don't know, how is it possible, but I realy had old 7260 version.Thank you again! :)))

  • Anonymous
    August 25, 2011
    In my caseApplication Verifier 3.4 utility was blocking the installation of VS 2010.

  • Anonymous
    September 05, 2011
    My problem resolved thanks

  • Anonymous
    October 09, 2011
    As simple as saving the download directy to C:/ (no regedit) and it worked right away. Thank you so much!

  • Anonymous
    January 18, 2012
    Thanks so much! :] I appreciate the post! :D

  • Anonymous
    March 14, 2012
    Thanks. You saved my time :)

  • Anonymous
    July 05, 2012
    This really helps me. Thanks

  • Anonymous
    July 30, 2012
    thank u very very much

  • Anonymous
    August 06, 2012
    osom!

  • Anonymous
    August 24, 2012
    after deleting from regedit as told..just placed the .exe file on desktop and now its installation beging again ! fingers croossed may it work now

  • Anonymous
    August 27, 2012
    Did the same thing....just renamed the exe and run it successfully...Thanks for the valuable posts guys

  • Anonymous
    September 05, 2012
    Thanks a bunch.. this saved a lot of time.

  • Anonymous
    October 08, 2012
    I tried to download Visual C++ 2010 Express but I had an error message about compatibility. I'm on Win 7 Home Premium x64 (forgive me about my syntaxis, I'm just french!). Good rollin'!

  • Anonymous
    October 08, 2012
    Hi nicolascadot9@gmail.com - The title of this blog post refers to the Windows Phone tools, but the same type of workaround should work for all editions of Visual Studio.  Can you please give the workaround a try and let me know if it helps solve this issue on your computer?

  • Anonymous
    October 16, 2012
    It worked for me thanks...

  • Anonymous
    November 01, 2012
    Thanks a ton Aaron!!

  • Anonymous
    November 25, 2012
    I fixed this my simply renaming the downloaded installer to "install".

  • Anonymous
    December 03, 2012
    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!

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

  • Anonymous
    April 19, 2013
    Thank you very much!!!

  • Anonymous
    May 15, 2013
    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.

  • Anonymous
    May 15, 2013
    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.

  • Anonymous
    May 29, 2013
    its works in 5 min thnx alot !

  • Anonymous
    August 28, 2013
    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!

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

  • Anonymous
    October 25, 2013
    Thanks Kashif_Imran. It worked for me too. I just copied the file in C drive.

  • Anonymous
    November 06, 2013
    thanks alot for the help! :)

  • Anonymous
    December 12, 2013
    Downloaded, Renamed it to vm_web1, it worked.  Thanks  Windows 7 - 64 bit

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

  • Anonymous
    January 27, 2014
    Just Goto "Setup folder" inside the VS Setup folderrun setup.exe from inside that folder.you will have no error.The error appears when you install from the root folder.Happy Programming

  • Anonymous
    March 07, 2014
    TNX :D

  • Anonymous
    August 03, 2014
    Thanks Kashif_Imran, it worked for me :)

  • Anonymous
    August 21, 2014
    Thanks a lot. It solved the problem. worked for me.

  • Anonymous
    September 28, 2014
    Thank you Brennen R for suggesting that we change the setup's directory. I simply moved it to my desktop and it worked again.

  • Anonymous
    December 07, 2014
    لا اعلم لماذا يظهر هذا الخطا وكيفية تجنبه او التخلص منه لتشغيل البرنامج مره اخري

  • Anonymous
    December 08, 2014
    Hi Saad - Have you tried the workarounds listed in this blog post yet?  To summarize - you can find and delete the AppCompat registry keys, or you can rename the program that you're trying to install (either by renaming the .exe or by saving it to a new path).

  • Anonymous
    July 14, 2015
    I renamed the file and it worked fine after that

  • Anonymous
    September 07, 2015
    tkx sooooo much u saved my day !!

  • Anonymous
    October 27, 2015
    Thanku so much!!

  • Anonymous
    November 09, 2015
    Thanks Sir, It really work.

  • Anonymous
    January 22, 2016
    thanks thanks <33