I suggest you ...

TeamBuild (MSBuild) Platform "Any CPU" vs. "AnyCPU" different in Solution and Project

An already well known issue is the mismatch of the Platform=AnyCPU (in *.*proj) and Platform=Any CPU (in *.sln), which is annoying, but M icrosoft denied to fix it (see:

But in TFS TeamBuild as a consequence to this issue it is impossible to specify a Solution and a Project file as items to build at the same time, when you intend to target plain MSIL
, aka "Any CPU".

This only works, when leaving the configuration (or platform at least) empty and so making use of the Default fallback behavior in MSBuild.

It is especially painful when having to specify more than one platform to build, i.e. x86, x64 in Addition to AnyCPU.

When using MTM Lab Management you have to choose a build configuration to deploy, which isn't named properly.

Please adapt *.sln files to accept "AnyCPU" as platform - or improve the TeamBuild logic to deal with it.

81 votes
Sign in
Password icon
Signed in as (Sign out)
You have left! (?) (thinking…)
zaengi shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

1 comment

Sign in
Password icon
Signed in as (Sign out)
  • zaengi commented  ·   ·  Flag as inappropriate

    Explaining my Lab Deploy issue mentioned above:
    When omitting the Platform specification in the build, then as a result you will get two available configurations, i.e. "Release|AnyCPU" and "Release|Any CPU" which you have to choose between in the Lab workflow.
    Of course, you can't choose "the right one", because when more than one build configuration exists, TeamBuild will create a subfolder for each normally, which is not the case here, since "AnyCPU" and "Any CPU" is regarded the same.

    So, depending on your choice, $(BuildLocation), the source path for the deployed artifacts, will point to a non existing folder, i.e. \\builddrop\BuildDef\BuildDef_01\Release - or, worse - \\builddrop\BuildDef\BuildDef_01\AnyCPU\Release.

    But correct would be "\\builddrop\BuildDef\BuildDef_01"

Feedback and Knowledge Base