6 April 2016 Update: Added the correct values for VS 2015.
If you are working on ASP.NET MVC web sites in Visual Studio 2013 (VS 2013) or 2015 (VS 2015), you need to make one registry change if you want to run IIS (Internet Information Services) Express as a 64-bit process by default. Use one of the methods, below.
Within VS 2013 or VS 2015:
Tools | Options | Projects and Solutions | Web Projects | Use the 64 bit version of IIS Express…
* Thanks to Christian Lundestad, David, Javier Collazo and Eliza for pointing this method out in the comments.
For VS 2013, use
1 reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\WebProjects /v Use64BitIISExpress /t REG_DWORD /d 1
For VS 2015, use
1 reg add HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\WebProjects /v Use64BitIISExpress /t REG_DWORD /d 1
For VS 2013, navigate to:
For VS 2015, navigate to:
For both VS 2013 and VS 2015:
- Make sure there is a REG_DWORD value named “Use64BitIISExpress”. If not, create it.
- Set its value from 1 (default = 0).
That’s it. Now you can debug your 64-bit web sites.
If you don’t do this, you will likely get a message similar to:
“Could not load file or assembly or one of its dependencies. An attempt was made to load a program with an incorrect format.”
I found this solution for Visual Studio 2012 (VS2012) on Stack Overflow here.
This post was migrated from https://blogs.msdn.microsoft.com/rob/2013/11/14/debugging-vs2013-websites-using-64-bit-iis-express/.