I am getting strange behavior from MSBuild.
I use the command:
msbuild.exe /p:Configuration="Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" "MySolution.sln" && exit %%ERRORLEVEL%%
And it gives me the error:
MySolution.sln : error MSB4126: The specified solution configuration "Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I)|Mixed Platforms" is invalid. Please specify a valid solution configuration using the Configuration and Platform properties (e.g. MSBuild.exe Solution.sln /p:Configuration=Debug /p:Platform="Any CPU") or leave those properties blank to use the default solution configuration.
There are targets for Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) in my solution. My question is: Why is MSBuild appending "|Mixed Platforms" to the configuration I supplied? How can I get rid of this behavior?
I tried:
msbuild.exe /p:Configuration=Release "MySolution.sln" && exit %%ERRORLEVEL%%
But it said:
Building solution configuration "Release|Mixed Platforms".
The notation
Something1|Something2is forConfiguration|Platform. So for default C# projects you will have possible values likeDebug|Any CPUorRelease|Any CPU. From your fragment it looks like you are trying to specify both the configuration and the platform. If so then you should do it like:In this case you would need to ensure that all projects inside of the MySolution.sln contains a Release configuration and a “Windows Mobile 5.0 Pocket PC SDK (ARMV4I)” defined.
Is this what you need? I’m not sure because I’m confused about your statement “There are targets for Release|Windows Mobile 5.0 Pocket PC SDK (ARMV4I) in my solution“