Re-establish TFS source control bindings

前端 未结 10 1115
别跟我提以往
别跟我提以往 2020-11-29 02:16

I have about a dozen Visual Studio 2010 projects I\'ve been working on that are versioned in a TFS repository. Recently I went on a vacation and upgraded my computer\'s OS t

10条回答
  •  攒了一身酷
    2020-11-29 02:54

    I'm going to add this here because I ran into a variant of this and had to find a solution on my own.

    The TLDR::
    1) Make sure the project is unbound.
    2) Manually select all files of the project and add them to sourcecontrol (not the project itself) - this should create the problematic project's root folder under TFS
    3) In source control explorer, navigate to the root folder of the problematic project and manually add its .csproj to source control

    And the full story of how/why I got there:

    IF all answers above don't work (*adospace's answer may be related to this - but I didn't quite understand it :P )

    I had 2 projects out of 9 in my solution that were purely Resource projects. When I brought the whole thing into tfs and mapped it to source control they would resolutely remain with invalid bindings (just the two resource projects), nothing I did fixed it. When I finally tried adding manually the project individual files to tfs (the .resx), TFS threw warning about the files being ignored, just like .exes, something it had never done once when adding - remapping - fixing my solution. The warning allowed me to add the files to TFS anyway and at the same time it created the full project folder structure while the projects themselves remained resolutely unbound. But from there I was able to add manually each .csproj to TFS and magically the projects are now properly bound and under source control. I'm not sure why those file types were getting ignored from being added to source control, it might be some default settings in TFS or VS.

提交回复
热议问题