![vs2015 application wizard writing to the x86 program folder vs2015 application wizard writing to the x86 program folder](https://i.stack.imgur.com/pTsDo.png)
![vs2015 application wizard writing to the x86 program folder vs2015 application wizard writing to the x86 program folder](https://i.stack.imgur.com/Bp0xW.jpg)
IF EXIST "%25ProgramFiles%25\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build" call "%25ProgramFiles(x86)%25\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars32.bat" & goto :run IF EXIST "%25ProgramFiles(x86)%25\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build" call "%25ProgramFiles(x86)%25\Microsoft Visual Studio\2017\Professional\VC\Auxiliary\Build\vcvars32.bat" & goto :run IF EXIST "%25ProgramFiles%25\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build" call "%25ProgramFiles(x86)%25\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars32.bat" & goto :run In Visual Studio 2017, Microsoft has changed the DevEnvDir requiring a more complicated post build event that searches for the editbin: IF EXIST "%25ProgramFiles(x86)%25\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build" call "%25ProgramFiles(x86)%25\Microsoft Visual Studio\2017\Enterprise\VC\Auxiliary\Build\vcvars32.bat" & goto :run Up to Visual Studio 2015 the post build event was as follows: call "$(DevEnvDir).\tools\vsvars32.bat" Initially we've added it to every migration as a post build event, but in recent migration we only add it if we run into a bug that justifies it. (Exception from HRESULT: 0x800703E6)Īfter researching the matter we found the running editbin /nxcompat with some configuration solved this problem for these com components.įor more info on edit bin see Microsoft editbin documentation System.DllNotFoundException - Unable to load DLL 'some dll': Invalid access to memory location.System.DllNotFoundException - Unable to load DLL 'xxx\mgchart': A dynamic link library (DLL) initialization routine failed.Here are some examples of the errors we got: In the migration we ran into cases where old com component or external dll's would crash with an error regarding "Data Execution Prevention" and other wierd crashes. Go to "Add/Remove Programs", Right-Click on VS installation -> you should get an option to modify the installation. In both VS2015 and VS2017, you can configure this even after VS is already installed. If you are using VS2017, during the installation, make sure to check "Desktop development with C++" By default VS2015 only installs C# and VB.net, but not C++ with its tools. To overcome this issue, make sure the C++ Tools option in the installer is selected. This is due to the fact that Visual Studio checks for the environment variable according to the installed VS.
Vs2015 application wizard writing to the x86 program folder upgrade#
In some cases, mainly when you upgrade VS, the build in 2015 will fail with the following message: Build error – “C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE.\tools\vsvars32.bat” editbin Visual Studio 2015