Need some assistance with TFS2010 + an automated Build + 'Configurations to Build = Debug'

你离开我真会死。 提交于 2019-12-06 11:51:38
Pure.Krome

Well, I found the answer, but I'm not too happy with it. I'll make a video of this bug and email it off to Vishal @ MS ... to see what he thinks :)

Anyways, if you look carefully at the default configuration everywhere it is this...

DEBUG | Any Cpu

nothing unusual there...

Now, when I change the platform to AnyCpu (notice how i removed the space....) it now works fine.

eg..

What made me think about that was when i checked out the .proj file... .. here's a snippet of that....

<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <ProductVersion>9.0.30729</ProductVersion>
    <SchemaVersion>2.0</SchemaVersion>
... snip for brevity ...
    <SccProvider>SAK</SccProvider>
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
    <DebugSymbols>true</DebugSymbols>
    <DebugType>full</DebugType>
... snip for brevity ...
    <DesktopBuildPackageLocation />
  </PropertyGroup>
  <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
    <DebugType>pdbonly</DebugType>
... snip for brevity ...          
    <CodeAnalysisRuleSet>AllRules.ruleset</CodeAnalysisRuleSet>
  </PropertyGroup>

so yeah .. i fixed it but i'm not sure if that is acceptable or just a fluke. I'll need to get some real answers from the MS team :)

I can confirm this behavior as well as the work-around. It looks like VS2010 will automagically remove the space when it either a) saves the Platform value to the solution/project files, or b) removes it when it invokes MSBuild.

Either way, the TFS Build engine does not follow this pattern and it is imperative to remove the space manually if you are selecting specific Platform|Configuration values.

On interesting side note, the TFS Build Definition dialog permits you to enter just the Configuration. It will complain but then accept the input. The advantage of this approach is that the Microsoft.Common.targets file gracefully handles an empty Platform input value by defaulting to "AnyCPU".

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!