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

  • Home
  • SEARCH
  • 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 9010521
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T02:28:59+00:00 2026-06-16T02:28:59+00:00

I have a Project holding server controls. Whenever I make changes to it I

  • 0

I have a Project holding server controls. Whenever I make changes to it I want to be able to Build in Release mode and have the output DLL (and its documentation Xml file) copied to a folder in Team Foundation Server.

I have come out with a post-build event that:

  1. Checks both DLL and XML out.
  2. Copies them to the TFS folder
  3. Checks them back in with some comments.

This is the script:

if $(ConfigurationName) == Release "$(DevEnvDir)tf" checkout /lock:none C:\CommonAssemblies\$(TargetFileName)
if $(ConfigurationName) == Release "$(DevEnvDir)tf" checkout /lock:none C:\CommonAssemblies\$(TargetName).xml
if $(ConfigurationName) == Release copy $(TargetDir)$(TargetFileName) C:\CommonAssemblies\ /Y
if $(ConfigurationName) == Release copy $(TargetDir)$(TargetName).xml C:\CommonAssemblies\ /Y
if $(ConfigurationName) == Release "$(DevEnvDir)tf" checkin C:\CommonAssemblies\$(TargetFileName) /noprompt /comment:"File checked in automatically by Post-build action in source project."
if $(ConfigurationName) == Release "$(DevEnvDir)tf" checkin C:\CommonAssemblies\$(TargetName).xml /noprompt /comment:"File checked in automatically by Post-build action in source project."

This works, but only if there is at least one change in the code, and at least one change in any of the XML comments. If I try to build twice without any change, I get an error saying:

The command "if Release == Re...... " exited with code 1.

How can I get rid of this error?

From the Output window, I can read that TFS detected there were no changes in the file and it Undo the edit.

What can I add to my checkin instruction to ignore such checkin when no change is detected? I’ve been working so far with that script, but I must remember each time to add a random space to the code and to some comment for it to work properly. There must be something I’m missing, maybe a parameter or else.

Here’s part of the text from the Output window:

C:\CommonAssemblies:
  Controls.dll
C:\CommonAssemblies:
  Controls.xml
          1 file(s) copied.
          1 file(s) copied.
  C:\CommonAssemblies:
  Checking in edit: Controls.dll

  Changeset #6188 checked in.
  C:\CommonAssemblies:
  Checking in edit: Controls.xml

  The following changes were not checked in because the items were not modified.
    Undoing edit: C:\CommonAssemblies\Controls.xml

  There are no remaining changes to check in.
  • 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-06-16T02:29:01+00:00Added an answer on June 16, 2026 at 2:29 am

    I came across another similar question and I found the answer.

    The /force parameter is what was missing from the checkin instruction. This checks in the file even when there are no detected changes within.

    This script is no longer throwing errors:

    if $(ConfigurationName) == Release "$(DevEnvDir)tf" checkout /lock:none C:\CommonAssemblies\$(TargetFileName)
    if $(ConfigurationName) == Release "$(DevEnvDir)tf" checkout /lock:none C:\CommonAssemblies\$(TargetName).xml
    if $(ConfigurationName) == Release copy $(TargetDir)$(TargetFileName) C:\CommonAssemblies\ /Y
    if $(ConfigurationName) == Release copy $(TargetDir)$(TargetName).xml C:\CommonAssemblies\ /Y
    if $(ConfigurationName) == Release "$(DevEnvDir)tf" checkin C:\CommonAssemblies\$(TargetFileName) /noprompt /force /comment:"File checked in automatically by Post-build action in source project."
    if $(ConfigurationName) == Release "$(DevEnvDir)tf" checkin C:\CommonAssemblies\$(TargetName).xml /noprompt /force /comment:"File checked in automatically by Post-build action in source project."
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have project I want to upgrade to .Net4 and it use BackgroundCopyManager.dll. Anyone
I have multiple plug-ins in my RCP-based project. I want to be able to
I'm working on a project that will have a single table holding lots and
I have a project where I am using Java RMI to make objects remotely
I have a Visual Studio 2008 project that has a reference to a dll.
I have a RichEditiableText component in a Flex 4.5 project and I want to
I have project asp.net with namespace test and I'm using resources (files Resource.resx and
I have project on rails 3 with multiplayer using Faye. The error block in
I have project Emle in Launchpad . I set it to import from emle.svn.sourceforge.net
I have project in Dropbox and two running laptops: one with Ubuntu and one

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.