Wibble
Wibble

Reputation: 331

How do I remove TFS connections from a Visual Studio 2010 C# project/solution?

I have been given the full source code to work on locally (C#.NET/XAML/Visual Studio 2010), but I do not have access to TFS.

Every time I open the solution, it always asks for TFS which I have to cancel every time, but the code is now developed locally from here on out and I will not have access.

How do I effectively "disconnect" TFS from this build?

Upvotes: 8

Views: 11727

Answers (4)

Saeed Neamati
Saeed Neamati

Reputation: 35822

If solution is already unbound (which happens sometimes), you can simply open the solution file, or the project file in notepad, and delete information regarding connecting to TFS.

In solution files (.sln files) for example, you might see information like this:

GlobalSection(TeamFoundationVersionControl) = preSolution
    SccNumberOfProjects = 4
    SccEnterpriseProvider = {4CA58AB2-18FA-4F8D-95D4-32DDF27D184C}
    SccTeamFoundationServer = https://nemati.visualstudio.com/defaultcollection
    SccLocalPath0 = .
    SccProjectUniqueName1 = ..\\Framework\\Framework\\Framework.csproj
    SccProjectName1 = ../Framework/Framework
    SccLocalPath1 = ..\\Framework\\Framework
    SccProjectUniqueName2 = Website\\Phis.csproj
    SccProjectName2 = Website
    SccLocalPath2 = Website
    SccProjectUniqueName3 = Tests\\Tests.csproj
    SccProjectName3 = Tests
    SccLocalPath3 = Tests
EndGlobalSection

Just read it, and you'll understand what it says. Very simple, self-descriptive and self-explanatory. Just delete this section and reopen your solution.

Upvotes: 3

Darian Thomson
Darian Thomson

Reputation: 13

The best way I found was to go Tools > Options Then, under the left hand menu select "Source Control".

You should see a "Current source control plug-in:" dropdown menu on the right hand side. Select "None" and please do this while no projects are open.

Doing it this way makes it easy if you ever wanted to learn TFS.

Upvotes: 0

Dean Kuga
Dean Kuga

Reputation: 12119

File>Source Control>Change Source Control...>Unbind

Beaten to it...

Upvotes: 4

Jess
Jess

Reputation: 3049

You can either choose to work offline, or unbind the projects:

File->Source Control->Change Source Control

Upvotes: 13

Related Questions