disconnect visual studio solution from sourcesafe? - visual-studio

I'm working on a project for a firm that has their main solution in sourcesafe. The other developers are working like beavers on new stuff, and I'd like to be able to download the source from VSS, then disconnect it. So I can get up to speed on the code without risk of bothering anyone else's code.
Is it possible to do this? Many thanks if so.
-Larry

It's been a while since the scary days of source safe, but i believe this is what you have to do. In Visual Studio, go to File -> Source Safe -> Change Source Control (?). It'll open up a new window and list projects under current solution bound to Source Safe. Select the project you want to remove and click 'Unbind' at the top. It'll remove source safe bindings from the project. If you have to bind again, just click 'Bind' and select the location in the repository to bind to.

From How to Remove Version Control Bindings from Visual Studio Solutions at devx.com:
Close all instances of Visual Studio, and delete all the files in the solution directory that end with .scc.
Edit the solution to remove all traces of the source code controller binding. Remove the section GlobalSection(SourceCodeControl) in the solution file. Also remove the keys named SccProjectName, SccLocalPath, SccAuxPath, and SccProvider.

Why don't you just make a branch?

To unbind the solution/Project from VSS:
In Visual Studio, open Solution Explorer and select a solution or project to unbind.
On the File menu, click Source Control, then Change Source Control.
In the Change Source Control dialog box, click Unbind.
Click OK.

Related

Visual Studio 2012 project lost link to TFS

So I came back to a project that I was working on a few months ago, and when I load it one of the projects seems to have lost the link to it's entry in TFS. The solution explorer doesn't show the lock icons for it, but I still see it in TFS.
I tried performing a add to source control but it says that the items already exist.
Anybody have ideas on how to fix this?
I'm trying to avoid remapping because there are a few branches, and I'm not even sure that will fix it.
Your solution has lost the TFS binding, you can do the following to fix it. First open the solution/project you wish to bind in Visual studio then:
Highlight the project or solution you wish to bind to Team Foundation version control in Solution Explorer.
On the File menu, click Source Control, and then click Change Source Control.
3.In Change Source Control dialog box, click Bind.
MSDN Link
Update for VS 2013 (thank you Caad9) - In VS 2013 [Ultimate at least] there's an additional level in the menu; File - Source Control - Advanced - Change Source Control... which brings up the dialog

Some projects not showing TFS Menus

I have 8 projects in my solution. 3 of them are not showing any TFS menus when I right click on the project or any of the files from Solution Explorer. They are in TFS though, if I go through the Source Control Explorer I can manually check them out/in. Also those 3 projects do not have associated .vspscc which the other 5 projects do. Something must have got messed up but I am not sure what. How can I fix this so that I get those TFS options back in Solution Explorer. Having to manually check out/in is not practical.
edit: I've tried wiping my local copy and bringing the solution down from source control again. I've also removed those projects from the solution and re-added them which did not work.
It sounds like 3 of your projects have lost their source control bindings. You should be able to restore them easily. Just go to the Change Source Control dialog, which will allow you to set the source control bindings for all the projects in your solution:
File > Source Control > Change Source Control...
Then you'll need to enter your TFS server name and the server path for the projects that have lost their bindings.
Edward got me pointed in the right direction, for me it was an issue of TFS having gone offline.
Resolution: I selected the Solution level in Solution explorer, then went into File>Source Control> and selected the Go Online menu option, which restored all of my right click TFS menu options.

VS2010 "Add Item" directory change

Is there any way to change the default directory Visual Studio 2010 uses when you add a source file through Add -> New Item?
Add New Item simply adds the item based on which project directory you're currently in or have selected in your Solution Explorer. If you want to change where it gets added then select the target location in the Solution Explorer first.
This behavior is obvious when right-clicking in the Solution Explorer, but it's also the same when using Project -> Add New Item....
Since my comment seems to be the actual answer, I repost:
In the toolbar of Solution Explorer, there's a button "Show all files" (or similar, I'm using the German version). This switches the view to directories, rather than filters. In this view, you can right-click on the desired target folder to add items.
This does not actually change the default directory, but since you have to click somewhere anyway to add an item, this is the easiest approach.
Note that even when only using Visual C++, I'd recommend the Productivity Power Tools extension, which comes with Solution Navigator. In C++, this is not as powerful as with .NET, but it still has several features that are useful in C++ and can fully replace Solution Explorer.
Try going to tools -> options -> Project and Solutions.
I know this post is old... but maybe someone will stumble upon it... like I did today...
I had the same "problem":
I have a dedicated directory for icons.
When I need to add an icon to the resource file, Visual studio takes me to "C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE"
To fix the problem, after I "browsed" to the desired folder, I right-clicked the favorites of the "open file" dialog and selected "add current location to Favorites".
Next time you will get this dialog, you simply have to look for the folder in the favorites, and click it.

How to add TFS bindings to a Visual Studio 2010 project?

There's a question already discussing how to add project/solution bindings to TFS, however it seems to only apply to Visual Studio 2008 (I am unable to find the "Change Source Control" dialog in VS2010).
I have a solution and source code on my local machine already in TFS, however it does not have TFS bindings (the thing that produces the padlock icon in the Visual Studio Solution Explorer and allows automatic checkout).
How can I add bindings to an existing TFS project using Visual Studio 2010?
In VS2010 check Tools>Options>Source Control and see if set to TFS. If not that might be why you don't see File->Source Control->Change Source Control.
I ran into this problem and, for me, the issue was that my solution was offline with respect to TFS. Upon trying to change source control, I received a message stating that it is already associated with source control but is offline. I placed the solution on-line, per my recollection, using the File->Source Control->Go Online menu option and this seemed to fix the problem.
Go to the source control explorer under Team Explorer, where you can see your repository. Right click on the top folder that maps to the folder on your local machine. There's an option called "Map to local folder". Map this to the folder on your local machine. This will set up all the bindings for TFS for your project.
I had the same problem and the following steps solved it for me in VS 2008.
Unfortunately, I didn't record the exact steps and don't want to add a new project to our TFS to try again, so the steps are from memory.
Go to File Menu -> Source Control -> Open from source control
Select solution file from TFS hierarchy
Accept any warning about project already being on local disc
A popup dialog comes up saying something along the lines "This solution is already under source control, but no bindings exist. Do you want to add them?"
A selector shows all projects in a grid and allows adding the required bindings. Add TFS server setting to each project (select all lines in grid at once and press a button at the top. I can't remember what it was called, but it was fairly obvious).

How to disconnect solution from source control on TFS

I have a solution with solution folder and projects.
Get the whole soure code from TFS in a local folder say c:\mycodes
Then copy the folder c:\mycode to another folder c:\lab
In c:\lab, remove all source control file *.vssscc, *.vspscc, then open the solution in c:\lab again.
Part of the project disconnect from TFS, but part of the projects in this solution still connect to TFS and some *.vssscc, *.vspscc files recreated when open the solution. Then unbind all project from server, those projects still have *.vspscc files auto generated.
I want to a clean copy of the source code with no source control. How to resolve this problem?
In Visual Studio, select the solution in the solution explorer, then go to the File menu. Under the file menu, you'll see a Source Control menu. Under that you'll see Change Source Control.
Select this, and in the dialog box that comes up, choose "unbind."
Your solution is no longer bound.
Delete *.vssscc, *.vspscc, files .
Open .sln file on notepad. Delete the code lines:
Code:
GlobalSection(TeamFoundationVersionControl) = preSolution
SccNumberOfProjects = 1
SccEnterpriseProvider = JKHJ78900-10FA-6457-4535-645676465463}
SccTeamFoundationServer = https://********.visualstudio.com/defaultcollection
SccLocalPath0 = .
EndGlobalSection
In VS-2013 from "Solution Explorer" select any solution. From FILE menu select Source Control->Advance->Change Source control.
In the pop-up window you can finally click unbind button for each project of the solution.
Took me a while to find from answer by #Robaticus. Sorry, can't comment yet.
visual-studio-2013
I often need to take solutions or projects out of TFS source control to send to clients without and source control bindings left behind. I use a utility from CodePlex to acheive the job. PLease refer to my blog post "How to Permanently Remove TFS Source Control Bindings from Visual Studio Solutions (VS2012)" http://camerondwyer.wordpress.com/2012/11/07/how-to-permanently-remove-tfs-source-control-binding-from-visual-studio-solutions-vs2012/
You must also edit the .sln file, because Visual Studio stores TFS Bindings mostly in this file, one line per project.
Err, wait. You'll still use some source control, right ? Even if I'm no fan of TFS, dropping it for no source control would be a poor move.
Visual Studio 2019
Here are the steps to be taken to "How to disconnect solution from source control on TFS".
Step 1)
Step 2)
Step3)
I had to do this, because I wanted to remove all information used by Azure Dev Ops and then post the project on GitHub.

Resources