1

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".

1 Answer 1

1

The notation Something1|Something2 is for Configuration|Platform. So for default C# projects you will have possible values like Debug|Any CPU or Release|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:

msbuild.exe /p:Configuration="Release",Platform="Windows Mobile 5.0 Pocket PC SDK (ARMV4I)" MySolution.sln

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"

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.