Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 915001
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T17:48:52+00:00 2026-05-15T17:48:52+00:00

really. weird. shiz. When I do a TFS Team Build (with Remote Deploy ),

  • 0

really. weird. shiz.

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

alt text

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

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

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

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

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.

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

alt text

Still no love.

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

  • web.config
  • web.debug.config
  • web.release.config

… 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???

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

Please help!

NOTE: I cannot accept anymore donations for the world’s smallest violin – I have been given plenty already. Cheers 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T17:48:52+00:00Added an answer on May 15, 2026 at 5:48 pm

    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

    alt text

    nothing unusual there…

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

    eg..

    alt text

    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 🙂

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 479k
  • Answers 479k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Is it in the a Post you wrote? If so… May 16, 2026 at 5:45 am
  • Editorial Team
    Editorial Team added an answer if you are using rvm to develop, you can run… May 16, 2026 at 5:45 am
  • Editorial Team
    Editorial Team added an answer It is entirely possible to create your own copy-like method:… May 16, 2026 at 5:45 am

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.