I create a new solution with one project, and then change the target platform from "Any CPU" to "x86". After this new projects added doesn't get built by default, and their target platform doesn't follow the global settings. Why?!
Looking at the configuration manager new projects added are not checked to "Build", and they get target platform "Any CPU" instead of the globally set x86. Why is this happening? I expect new projects too to get the globally set and defined x86 target platform.. Some things I've tried:
<New..>
and try adding it I'm not allowed as ".. a solution platform with the same name already exists.".Initially I thought this was a problem from converting my solution from VS2008 to VS2010, but the problem applies both places. I.e. when I create a solution in VS2008 and just stay in VS2008 I still get the problem.
Yes, this is a very nearly breaking change in VS2010 and a bit of a mess. New solutions created in 2010 will have two configurations, "Debug|x86" and "Release|x86". Which is different from solutions created by previous versions, "Debug|Any CPU" and "Release|Any CPU" were the defaults.
When you then add an existing project created in a previous version to this VS2010 created solution, you'll get a nasty mixed bag. The platform combo now shows three options, "x86", "Any CPU" and "Mixed platforms". The latter will build all projects. What is also very confuzzling is that the configuration name actually doesn't directly affect the Platform Target setting.
It is fixable, you can search and replace "Any CPU" with "x86" in the .sln and .vcproj files with a text editor. Best approach perhaps is to stay out of trouble and let VS2010 convert a VS2008 solution instead of creating a new one. Yucky problem.