Ask a questionAsk a question
 

AnswerSkip compilation

  • Monday, November 02, 2009 7:46 PMrcatwork Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I would like to be able to skip the compilation step conditionally with a command line option, ie. /p:SkipCompilation=true

    Often a TFS build will compile the solutions successfully, but fails in some post-compile step. I would like to be able to fix and rebuild without compiling the source code again.

    Thanks.

Answers

  • Friday, November 06, 2009 5:53 AMRuiz YiModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     AnswerHas Code
    Hi ,

    Sorry that I misunderstand you in last reply.

    There is a workaround to meet yhis requirement.

    1 add <SkipCompilation>true</SkipCompilation> to <PropertyGroup> in TFSBuild.proj

    2 modify <ConfigurationToBuild> itemgroup
      
    <ItemGroup Condition=" '$(SkipCompilation)' != 'true' ">
        <ConfigurationToBuild Include="Release|Any CPU">
          <FlavorToBuild>Release</FlavorToBuild>
          <PlatformToBuild>Any CPU</PlatformToBuild>
        </ConfigurationToBuild>
    </ItemGroup>
    
    


    Best Regards,
    Ruiz

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi

All Replies

  • Wednesday, November 04, 2009 9:38 AMRuiz YiModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Hi,

    You can add SkipCompilation=true to <CustomPropertiesForBuild> in TFSBuild.proj

    Best Regards,
    Ruiz
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi
  • Wednesday, November 04, 2009 7:50 PMrcatwork Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    Would this skip the compilation steps?

    Here's what the build is doing now:

    Initializing build   
    Getting sources   
    Labeling sources   
    Compiling sources for Win32/Release.  
    Project "TFSBuild.proj" is building "Projects.sln" with default targets.

    Generating list of changesets and updating work items  
    Copying binaries to drop location  
    Succeeded

    What I want to do is to skip the BOLD steps with a command line argument:

    Initializing build   
    Getting sources   
    Labeling sources   
    Generating list of changesets and updating work items  
    Copying binaries to drop location  
    Succeeded


    Thanks.
  • Friday, November 06, 2009 5:53 AMRuiz YiModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     AnswerHas Code
    Hi ,

    Sorry that I misunderstand you in last reply.

    There is a workaround to meet yhis requirement.

    1 add <SkipCompilation>true</SkipCompilation> to <PropertyGroup> in TFSBuild.proj

    2 modify <ConfigurationToBuild> itemgroup
      
    <ItemGroup Condition=" '$(SkipCompilation)' != 'true' ">
        <ConfigurationToBuild Include="Release|Any CPU">
          <FlavorToBuild>Release</FlavorToBuild>
          <PlatformToBuild>Any CPU</PlatformToBuild>
        </ConfigurationToBuild>
    </ItemGroup>
    
    


    Best Regards,
    Ruiz

    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread. Sincerely, Ruiz Yi