tfsazure-devopsgated-checkin

Cannot be undone because a file already exists at "tfs file path here". The file must be deleted from disk for the undo to succeed


I have copied and paste that existing Uploads folder on same solution. I have renamed existing Uploads folder from "Uploads" to "Uploadsold". Then renamed that newly pasted(created) folder from "Uploads - Copy" to "Uploads". Then I have Gated check-in my code on TFS without .csproj file. Committed was successfully.

But here after I could not check in any changes. Whenever try to commit, cannot be undone because a file already exists at tfs file path here. The file must be deleted from disk for the undo to succeed. Even I have rollback whole changeset but still exists same error?


Solution

  • Just try below things to narrow down the issue:


    UPDATE:

    For the issue in get source step, just try to set clean to true and select source directory as the clean option in your build definition, then try it again.

    Seems it's related to the temp workspace which created during the build process. So, if that still not work, then try to change another agent for building or clean caches and restart the build agent server, check if that works.