instead of x86, msbuild is creating an x64 solution configuration via sln.metaproj – Stack Overflow
Posted by jpluimers on 2017/05/02
Sometimes msbuild
will throw an error like this for an x86
project:
"C:\Users\Developer\Versioned\libssh2\build\libssh2.sln" (default target) (1) ->
(ValidateSolutionConfiguration target) ->
C:\Users\Developer\Versioned\libssh2\build\libssh2.sln.metaproj : error MSB4126: The specified solution configuration "Debug|X64" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties
form="Any CPU") or leave those properties blank to use the default solution configuration. [C:\Users\Developer\Versioned\libssh2\build\libssh2.sln]
Cause:
vsvars64.bat
will set the environment variable Platform=x64
but vsvars32.bat
will not empty this environment variable.
Easiest is to run set Platform=
then run vsvars32.bat
.
Adopted from MSBuild creating an x64 solution configuration via sln.metaproj – Stack Overflow [WayBack]:
If you are running this in the Visual Studio x64 command window it will set an environment variable Platform=x64 that will be used by msbuild. You can verify this by running echo in the command prompt you are using.
echo %platform%
So you will need to override the default when using x64 cmd, or run from the x86 cmd.
malexander
–jeroen
Like this:
Like Loading...
Related
This entry was posted on 2017/05/02 at 12:00 and is filed under .NET, C++, Development, Software Development, Visual Studio 2015, Visual Studio and tools, Visual Studio C++.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.
Leave a Reply