How to start over with Team Foundation Server

I have a Visual Studio 2012 solution that was connected to Team Foundation Server.  Unfortunately, I deleted some files in my project, and added them back.  (I didn't realize that once a file is deleted in VS, a file with the same name and location can never be added back to TFS.)  After trying to rollback and then redo changes several times, it got to where there were many conflicts that couldn't be resolved.  Plus the mere process of checking things in tended to change my project so it wouldn't run. (Fortunately, I made a few different backups of the project on my local drive, as I realized that at this point TFS had gotten very messed up.)

So what I'm trying to do now is to start over...to basically create a whole new repository on TFS for the project and start from scratch.  But it's not cooperating.  Here's what I tried:  I went to File | Source Control | Advanced | Changed Source Control, and then selected "Unbind" for my solution and its projects.  Then I tried to re-add the project to Source Control, creating a new folder.  It complained that the project is already in source control.  However, I went out of VS and came back, and went back to "Change Source Control," and selected "Bind," and the Server Bindings gave a path that matched my new folder name that I had just created.  So I thought that this was okay, and I tried to check everything in.  But it only wanted to check in the few files that were different from the old repository (the one that I'm trying to get away from).  And sure enough, even if I tried to check those few files in, it says there are all sorts of conflicts.  So even though the "Server Binding" for the Solution and Projects points to a newly created folder, it still remembers where it was pointing before.

So I repeated the above steps, except that this time, I deleted the .suo file and also the source control meta data files for my solution and project.  I also looked in the solution and project files themselves to see if there were any references to Team Foundation Server, but I did not find any.  However, when I tried to bind to a new folder name in the TFS server, it still acted as if it was connected to the original messed-up repository.

Is there a way to make it forget about the old repository and just start from scratch?
NewbisAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Bob LearnedCommented:
I deleted the .suo file and also the source control meta data files for my solution and project.
I am not sure what that means.

Did you delete the .vspscc files for the project?

Did the project file have these lines?

   <SccProjectName>SAK</SccProjectName>
    <SccLocalPath>SAK</SccLocalPath>
    <SccAuxPath>SAK</SccAuxPath>
    <SccProvider>SAK</SccProvider>

Did you delete the project folder in TFS, and commit changes?
0
NewbisAuthor Commented:
I thought I had deleted the XML stuff, but I must not have, because when  tried it again after posting this, I did find that there was TF stuff in the file after all, and it deleted it, and then it worked.

Odd thing was that once all that was deleted, I could no longer pick the name of the new folder.  Fortunately, it remembered the name of the new folder that I was attempting to create before, so it used that.
0
Bob LearnedCommented:
TFS stuff is stored in different places:

1) Solution:

      GlobalSection(TeamFoundationVersionControl) = preSolution
            SccNumberOfProjects = 1
            SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
            SccTeamFoundationServer = http://tfs:8080/tfs/teamproject
            SccLocalPath0 = .
            SccProjectUniqueName1 = UnitTests\\UnitTests.csproj
            SccProjectName1 = UnitTests
            SccLocalPath1 = UnitTests
      EndGlobalSection

2) Project:

<Project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" DefaultTargets="Build" ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
  <PropertyGroup>
    <ProjectGuid>{55D38B7C-B732-427B-A7B4-7CAACDC460EB}</ProjectGuid>
    <SchemaVersion>2</SchemaVersion>
    <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
    <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
    <AssemblyName>RetargetingService</AssemblyName>
    <OutputType>WinExe</OutputType>
    <RootNamespace>RetargetingService</RootNamespace>
    <TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
    <TargetFrameworkProfile />
   <SccProjectName>SAK</SccProjectName>
    <SccLocalPath>SAK</SccLocalPath>
    <SccAuxPath>SAK</SccAuxPath>
    <SccProvider>SAK</SccProvider>

  </PropertyGroup>

3) .vspscc file where the project is located:

""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROVIDER"
}

4) .vssscc file where the solution is located:

""
{
"FILE_VERSION" = "9237"
"ENLISTMENT_CHOICE" = "NEVER"
"PROJECT_FILE_RELATIVE_PATH" = ""
"NUMBER_OF_EXCLUDED_FILES" = "0"
"ORIGINAL_PROJECT_FILE_PATH" = ""
"NUMBER_OF_NESTED_PROJECTS" = "0"
"SOURCE_CONTROL_SETTINGS_PROVIDER" = "PROJECT"
}
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Bob LearnedCommented:
There are tools for cleanly removing the bindings (although I can't personally vouch for them):

VS Unbind Source Control
http://vsunbindsourcecc.codeplex.com/
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
DB Dev Tools

From novice to tech pro — start learning today.