需要一些帮助TFS2010 +自动构建+'配置构建=调试“ [英] Need some help with TFS2010 + an automated Build + 'Configurations to Build = Debug'

查看:141
本文介绍了需要一些帮助TFS2010 +自动构建+'配置构建=调试“的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

真的。奇怪的。 shiz。

really. weird. shiz.

当我做了 TFS团队建设(用远程部署),一些#如果DEBUG preprocessor指令 code我有一个网页上不会被调用。当我的手动一键部署(远程部署) preprocessor指令 code ++工程。当我在本地调试中,code也适用。

When I do a TFS Team Build (with Remote Deploy), some #if DEBUG preprocessor directives code I have on a web page does not get called. When i manually one-click deploy (remote deploy) the preprocessor directive code works. When I debug locally, the code also works.

所以 - 问题看起来可能与我的配置设置构建模板我(我想?)。所以,这就是我: -

So - problem looks to be related to my configuration settings for the Build Template i have (I think??). So, this is what I have :-

没有什么太辛苦。这说...的请以实物编译器。建立我的项目(​​阅读:项目,而不是解决方案)。在调试模式

Nothing too hard. That says ... Please kind Compiler. Build my project (read: project, NOT solution) in 'DEBUG' mode.

在code,我有如下: -

The code i have is the following :-

#if DEBUG
    Log.Debug("We are in DEBUG mode.");
#else
    Log.Debug("We are _NOT_ in DEBUG mode.");   
#endif

所以,当这code(在某些aspx页面)被调用时,它打印出我们是在调试模式。当它的

So when this code (in some aspx page) is called, it prints out "We are in DEBUG mode." when it's


  • 本地主机(本地主机配置:调试)

  • 与远程服务器的手动的一键reploy(本地主机配置:调试)

  • Localhost (Localhost Configuration: Debug)
  • Remote server with manual One-click reploy (Localhost Configuration: Debug)

而不是当我让TFS的不断一体化踢

But not when i let TFS's continuous intergration kick in.

FML。

我想看看它是否是一个套管的情况(即#如果调试#如果调试 ),但它仍然无法正常工作。

I've tried to see if it was a CASING situation (ie #if debug or #if Debug) but it still doesn't work.

我那么即使尝试的明确的告诉的MSBuild配置....

I then even tried to explicitly tell MSBuild the configuration....

仍然没有爱。

呵呵..不过这是考克!我的同时的有一定的web.config变换

Oh .. but this is the corker! I ALSO have some web.config transformations


  • 的web.config

  • web.debug.config

  • web.release.config

...和ü可以猜测哪些文件中获得的转化的??获奖者如果妳猜对web.debug.config的所有的情况下的......即使团队构建这是在code示数!所以,它就像构建过程和工作流程都知道这是一个 DEBUG 配置.. KEWL!但汇编code不???

... and can u guess which file get's transformed ?? Winner if u guessed web.debug.config for all scenario's ... even the team build which is erroring in the code! So it's like the build process and workflow knows it's a DEBUG configuration .. kewl! but the compiled code doesn't???

最后,修改调试=真正的调试=false的没什么区别。

Lastly, changing debug="true" or debug="false" makes no difference.

有人可以帮助我之前跳出这栋楼?它杀死我的时候,不断地,这些奇怪的问题屁股在我生命中弹出。的叹息

Can someone please help before I jump out of this building? It kills me when, constantly, these weird ass issues pop up in my life. sigh

请帮帮忙!

请注意:我不能再接受世界上最小的小提琴捐款 - 他们给了我很多了。干杯:)

NOTE: I cannot accept anymore donations for the world's smallest violin - I have been given plenty already. Cheers :)

推荐答案

好吧,我找到了答案,但我不太高兴。我会让这个bug的视频和电子邮件它关闭维沙尔@ MS ...去看看他在想什么:)

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 |任何CPU

什么不寻常的存在...

nothing unusual there...

现在,当我改变了平台值为anycpu (注意我是如何删除空格....),现在工作得很好。

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

例如..

是什么让我想想那是当我检查了.proj文件......这里有一个片段......

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>

所以啊..我固定它,但我不知道这是可以接受的,或只是一个侥幸。我需要从MS队得到一些真正的答案:)

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 :)

这篇关于需要一些帮助TFS2010 +自动构建+'配置构建=调试“的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆