In previous versions of Visual Studio, there were separate command prompts for x86 and x64. In VS2015, there's only one, and it's forced to 32-bit explicitly.
@call "%VS140COMNTOOLS%VCVarsQueryRegistry.bat" 32bit No64bit
My project launches a batch file pre- and post-build to call installutil to uninstall/reinstall my windows service. When building for x64, I get the message:
System.BadImageFormatException: Could not load file or assembly...
An attempt was made to load a program with an incorrect format
Rather than fall down the rabbit hole trying to change the scripts, does someone have an easy solution to launching a 64-bit visual studio command prompt? I can't believe this isn't installed by default.
You can run this from a standard command prompt:
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\vcvarsall.bat" amd64
Or more directly,
"C:\Program Files (x86)\Microsoft Visual Studio 14.0\VC\bin\amd64\vcvars64.bat"
Edit according to your install location, of course.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With