I use a batch to build my solution. It work fine with Visual Studio 2013. But with Visual Studio 2015 this error occurs :
ERROR: Cannot determine the location of the VS installation
Batch for VS2013
call "%VS120COMNTOOLS%vsvars32.bat"
msbuild solution.sln /t:rebuild /p:Configuration=Release /p:Platform="Any CPU"
Work fine.
Batch for VS2015
call "%VS140COMNTOOLS%vsvars32.bat"
msbuild solution.sln /t:rebuild /p:Configuration=Release /p:Platform="Any CPU"
ERROR: Cannot determine the location of the VS installation.
The environment variable VS140COMNTOOLS is defined to
C:\Program Files\Microsoft Visual Studio 14.0\Common7\Tools
It's not the good path on my OS (Windows 8.1 64 bits). So I set VS140COMNTOOLS to
C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools
But error message still the same.
If anyone has ideas...
Thanks in advance :)
EDIT
I have found this temporary workaround with mklink (and add compatibility for older Visual Studio) :
IF NOT "%VS140COMNTOOLS%" == "" ( IF NOT EXIST "%VS140COMNTOOLS%" ( mklink /J "%VS140COMNTOOLS%" "C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\Tools" ) call "%VS140COMNTOOLS%vsvars32.bat" echo Visual Studio 2015... ) ELSE ( IF NOT "%VS120COMNTOOLS%" == "" ( call "%VS120COMNTOOLS%vsvars32.bat" echo Visual Studio 2013... ) ELSE ( call "%VS110COMNTOOLS%vsvars32.bat" echo Visual Studio 2012... ) )
... and after call msbuild.
Have you a best solution ?...