Visual Studio change Source Control from TFS back to VSS - visual-studio

Using Visual Studio 2015 I was previously working on a project which is in an old Visual Source Safe repository.
I needed to connect to a project in Visual Studio Online (Team Foundation Server) and so in Tools -> Options -> Source Control -> Plug In Selection I choose Team Foundation Server and successfully connected to the Visual Studio Online repository pulled down the code, worked on it and checked it in.
The problem comes when I need to access the project in VSS again. I tried to reverse the process. Setting the Plug In Selection back to Visual Source Safe. However even when I don't have a solution open the 'Team Explorer' is still connected to Visual Studio online and I can't connect back to VSS. When I open my VSS based project it is STILL connected to Visual Studio Online as well.
I don't have the option of moving the older project out of VSS just now (not my choice, I'm hoping it's going to change soon but not a choice I can make), and need to carry on working on it. I basically need to disconnect VS from VSO and can't, and can't connect to anything else instead.
Has anyone come across this problem and a solution to it? I've searched but only find answers about disconnecting a project from it's current source control, I don't want to do that, I want each project to remain with it's source control, but I need to be able to choose which source control VS is connected to.

Well I've found AN answer eventually, through trial and error... it's a bit of a faff.
First thing is I forgot that VSS doesn't use the Team Explorer. When I opened the VSS based project the project HAD actually connected to VSS, but the Team Explorer wasn't reflecting that. So I could carry on working on my VSS based project and just ignore Team Explorer.
However I still wanted to disconnect, because it had only been a one-off requirement to connect to that Visual Studio Online project.
What I did was...
1. Log out of my Microsoft account from Visual Studio.
2. Close and re-open Visual Studio.
3. Click close on the prompt to log in to my Microsoft account.
4. THEN the option to delete the connection was available in Team Explorer. Pretty sure it hadn't been there before.
5. Log back in to my Microsoft account.
Unfortunately I had also reset my Microsoft Account password in the trial and error, which I now think was unnecessary. I was just trying to force VS to stop connecting to that repository.

As Team Explorer is not use with VSS you may want to use "Team | Disconnect from TFS" to disconnect. Then switch your control...
Note: As VSS as been completely unsupported for many years you are incurring a significant business risk by staying with it. Have you raised this risk with your executive team? Do they know that their organisational asset is at risk?

Related

Is it possible to open a project with Visual Studio from different machines?

Earlier I asked a question, which has now been deleted. It was asked me of to come up with some different wording to my question. I'm sorry, but in this case I don't know how better to ask it then I have. Here's what I said:
At work I've got a desktop with Windows 10 on it. Been working there
for 3 years. We using TFS 2015 with TFVC. Recently I was given a
laptop, but without enough disk space, so what I have done is on the
laptop I mapped a drive to the second drive on my desktop, where I
keep all of the Visual Studio projects I work on, that are in TFS. I
had hoped I could just open the project on the mapped drive from the
laptop to the D: drive on the desktop. But VS complained to me. So, is
it not possible to open the same project, on only 1 machine, but being
accessed both on the machine and by a mapped drive from another
machine?
Perhaps it would be best if I illustrated. On my desktop I have a project in my D: drive, so it's located in D:\Src\LRAT. Its in TFS 2015 and we're using TFVC on-premise.
On my laptop I've mapped the drive from the desktop, using D: on the laptop, as D was available. So, I get into VS 2017 on the laptop and try to open the project in D:\Src\LRAT on my laptop. However, trying to do that results in a warning message issued from Visual Studio (the complaint I mentioned earlier) which says:
Team Foundation Server Version Control
The solution you are opening is bound to source control on the
following Team Foundation Server:
http://ourserver:8080/tfs/defaultcollection. Would you like to contact
this server to try and enable source control integration?
This confuses me a lot! I know that its in source control. Why is it asking me if I want it in source control? I want to be able to open it and use TFS/TFVC from my laptop against the same files and folders that are on my desktop. The dialog box that warning pops up in has 3 buttons, Yes No and Help. Clicking Help sends me to a very unhelpful link about Git and VSTS. I don't know what will happen if I click the Yes button, because that project on my desktop is already in source control, so I just click No because I don't know what else to do.
So, this leads to ask is it the case that in some way I don't yet understand opening a project created in VS 2017 and saved to TFS under TFVC on my desktop is different than opening that same project from my laptop connected to the D: drive on my desktop?
The solution you are opening is bound to source control on the
following Team Foundation Server:
http://ourserver:8080/tfs/defaultcollection. Would you like to contact
this server to try and enable source control integration?`
This kind of pop-up info, usually indicate there are some mapping issue related. Please double check your workspace mapping first.
Besides you could also try to connect your project in Team Explorer -Visual Studio follow below steps:
1 View->'Team Explorer'
2 'Manage Connections' (green plug)
3 'Manage Connections' (drop down) -> 'Connect to Team Project'
4 List of projects shows up from your account.
5 Select Project and Connect
More details take a look at this similar issue-- Opening an existing VS2015 solution bound to TFS hangs VS2017RC

team server foundation 2010 is only working in offline mode

In my company, we are using Team Server Foundation 2010.
Last week when I was checking out some ssrs (sql server reporting services 2010) files, I obtained the correct files from TFS. I could see that the files were still connected to TFS.
However, I think there was a time last week where there was a message saying that I was working offline.
Now when I obtained the most current code from TFS, I do get the correct code. However I do not see that the code is connected to TFS any longer. Basically when using Source Control Explorer, I do not see that this code is linked to TFS
Thus I would like to know how to get my code back to accessed in TFS 2010?
Do you see the same problem with all files in TFS or only specific set of files?
Do you see this problem in only one workspace or in all workspaces on a single machine? Or does it affect all users?
What does it mean that files are not linked to TFS, can you post a screenshot?
TFS 2010 was quite weak story for offline and it worked only for solutions (as visible in Solution Explorer). Source Control Explorer always required connection to TFS
I'm also confuse about “files are not linked to TFS”you describle ,can you post a screenshot.
Simply offline mode means TFS 2010 goes offline (disconnect the connectivity properly between your local machine and TFS 2010 server) while your solution is already open though VS 2010.If you checkout files while you are in offline mode, then TFS 2010 source controls system doesn’t record or track any changes you made. But when you reconnect TFS server, the server will get you changes in pengding changes, then you can check in manually.
To get your solution back online to TFS you can try this solution:right-click on the solution name right at the top of the Solution Explorer and select the Go Online option.
More detail: How do I get my solution in Visual Studio back online in TFS?
You need to use the "go online" command to re-sync:
Cannot see go online option in tfs
Note: TFS 2010 is no longer supported and you should upgrade soonest

Cannot add SourceSafe Database as Visual Studio 2010 source control

My issue is that I cannot add SourceSafe Database for source control within Visual Studio 2010.
Our team was initially using VSS for source control in Visual Studio 2010. During an evaluation of TFS, I switched my source control to TFS. It will be a few weeks before a decision is made on TFS, so I needed to switch my source control back to VSS. However I'm now unable to add a SourceSafe Database in Visual Studio.
Steps to Reproduce in Visual Studio 2010:
1) Access the 'Open SourceSafe Database' form via Tools->Options->Source Control->Plug-in Settings-->Advanced
or via File->Source Control
2) The list of available database is blank so I choose 'Browse'.
3) I browse to the srcsafe.ini file for my VSS database and select it.
4) I'm promted to confirm the Database Name - Click OK.
5) The database does not appear in the 'Open SourceSafe' Database form. The list of available databases is still blank.
Note that I can add the database fine outside of Visual Studio using VSS directly. However the databases I add via VSS do not appear in the Visual Studio forms.
I'm suspicious that this is related to "down-grading" from TFS to VSS which may not have been heavily tested at MS.
Any assistance is appreciated.
I installed VS2010, then i install VSS, then i have the same problem, cant connect to my VSS it by default opens (TFS)
the suggestion here, to reinstall, dont sound good, did a bit more searching and found this:-
http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/6c927805-bca6-445b-b406-0a0da8fa21d3
and found the easy solution that 'CletusLoomis' is looking for:
simply:-
hanks for your post.
Could you please try the following steps?
Open VS2010, then choose the menu: Tools->Options, then click "Souce Control"
click drop-down box under text"Current souce control plug-in", use "None", rather than "Microsoft Visual Source Safe"
thats it, problem solved!
:)
hope this helps someone else who found this page via google.
To do that you must run Visual Studio 2010 as Administrator. Just click on Icon using right button, Go to Properties, Compatibility, at the botton of screen you should mark Run this program as administrator.
That's all.
Must exist some file that the permission should be granted to all users, but instead of searching for the file, I preffer this solution.
Regards,
Luiz Ricci
My Visual Studio 2010 had very similar symptoms: having selected Visual SourceSafe 2005 in the Options I had the only menu option: Launch Microsoft SourceSafe
While following the steps provided by 'visual' (as of Nov 30 '10 at 8:00) I have found the following registry key, which needs to be switched to 0 to enable the SourceSafe menu options to be displayed in Visual Studio 2010. Once the registry key value has been changed to zero Visual Studio needs to be restarted and .. voila! Now I have an additional menu option Open from source control...
The registry key is as follows (for 32bit OS it would need to be slightly modified): HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\SourceSafe\Namespace Extension\DisableOpenFromSourceControl
Now, why it was disabled by default is beyond me.
Your installation of VS might be corrupted. I would recommend uninstalling VSS, VS, and TFS and then reinstalling VS and VSS. Unfortunately, this could take 4+ hours, but it should fix your issue.
I don't believe that my VS installation was corrupted. I do believe there is a bug in VS 2010 which does not allow me to use VSS for source control after having used TFS. Fortunately for me, our team decided to go forward with TFS for our project's source control. I never had to solve the problem. I believe that reinstalling Visual Studio alone would have been enough to solve the issue.
I had the same problem with Windows 7, Visual Studio 2010 and VSS. I noticed several things:
VSS as standalone program does always work on my system.
VSS works perfectly in my projects, if the UAC Level is the lowest, but not with the default UAC Level.
If I open a project file with VSS source control, Visual Studio tries to read the registry. It fails to read/write the keys in the registry with access denied. Therefore I changed the permissions in the registry of the SourceSafe keys to full access for all users. Now, VSS works perfectly on my system with default UAC security level.
I faced the same problem.
I am using Visual Studio 2010 and my projects added to Visual SourceSafe 6.0
The VSS database list was not prompted on my machine as well.
After a number of attempts for over 3 hours. Finally got a solution.
I run the VS2010 using Run As Administrator option. The VSS database list was visble.
I think the issue might be due to Access Rights of Registry in Windows 7.
What a nightmare this has been. Ultimately, you can set in domain or local policy.
Local Security Policy\Security Settings\Local Policies\Security Options\User Account Control: Run all administrators in Admin Approval Mode - Disabled
This means anyone in the administrator group does not have to have approval (The Dreaded Run as Administrator)to be an administrator. Can be set locally as above or domain wide. Solved a lot of problems for us.
Options -> Source Control -> Make sure the "Current Source Control Plugin" is correctly set.
Mine was set to Microsoft Visual Source Safe (Internet), and should have been Microsoft Visual Source Safe.
First, make sure you can view the database by visual source safe explorer.
Then, trying to proceed with these step...
Open Visual studio as Administrator.
Log in visual source safe by the database path. (it still disappears the database in "Available database" list.)

How to work offline with TFS

Our TFS server has some temporary connectivity issues right now, and as such VS has gone unresponsive, leaving 50+ developers unable to work!
Is it possible to switch TFS into an offline mode in the event of such an issue?
See this reference for information on how to bind/unbind your solution or project from source control. NOTE: this doesn't apply if you are using GIT and may not apply to versions later than VS2008.
Quoting from the reference:
To disconnect a solution or project
from source control
In Visual Studio, open Solution
Explorer and select the item(s) to
disconnect.
On the File menu, click Source
Control, then Change Source Control.
In the Change Source Control dialog
box, click Disconnect.
Click OK.
The 'Go Offline' extension adds a button to the Source Control menu.
https://visualstudiogallery.msdn.microsoft.com/6e54271c-2c4e-4911-a1b4-a65a588ae138
plundberg: The "disconnect" button is only available for the TFS provider starting in VS 2008. Even then, I'm not sure if it's officially supported. The recommended way to use the Go Offline feature is to [re]open the solution.
Martin Pritchard: if you get stuck mid-operation, you can force VS to timeout by pulling the network plug (literally) or running ipconfig /release.
Once you're marked offline, here's a step by step guide to working in that mode: http://teamfoundation.blogspot.com/2007/12/offline-and-back-again-in-vs2008.html
More detailed info on tweaking the behind-the-scenes behavior:
http://blogs.msdn.com/benryan/archive/2007/12/12/when-and-how-does-my-solution-go-offline.aspx
http://blogs.msdn.com/benryan/archive/2007/12/12/how-to-make-tfs-offline-strictly-solution-based.aspx
There are couple of little visual studio extensions for this purpose:
For VS2010 & TFS 2010, try this
For VS2012 & TFS 2010, use this
In case of TFS 2012, looks like there is no need for 'Go offline' extensions. I read something about a new feature called local workspace for the similar purpose.
Alternatively I had good success with Git-TF. All the goodness of git and when you are ready, you can push it to TFS.
Depending on which tool windows you have open, VS may or may not try to hit the team server automatically when it starts up.
For best results try this:
Close all instances of visual studio
Open an empty visual studio (no project/solution)
See which windows are opened by default, if source control explorer or team explorer or any other windows that use team are opened (and activated) by default, close them or switch them to a background tab.
Close visual studio
You should notice now that you can start visual studio without it trying to hit the TFS server.
I know its just an aside to your problem, but I hope you find this helpful!
If you have a solution open, and TFS is down, you might have trouble going into offline mode. If you close and reopen your solution, a nice little dialog will appear asking you if you want to Go Offline.
Alternatively if you don't want to close/reopen the solution, (as suggested by Bernie) you can install the TFS Go-Offline plugin, then click:
TEAM -> Go Offline
Simply, change the root folder name for your solution in your local machine, it will disconnect automatically.
I just wanted to include a link to a resolution to an issue I was having with VS2008 and TFS08.
I accidently opened my solution without being connected to my network and was not able to get it "back the way it was" and had to rebind every time I openned.
I found the solution here;
http://www.fkollmann.de/v2/post/Visual-Studio-2008-refuses-to-bind-to-TFS-or-to-open-solution-source-controlled.aspx
Basically, you need to open the "Connect to Team Foundation Server" and then "Servers..." once there, Delete/Remove your server and re-add it. This fixed my issue.
If the code has already been checked out by the user that if offline and they have the latest version on their local hd, then they just need to browse to the solution location and open the solution by double clicking sln file. The solution will open in disconnected mode.

Removing SourceSafe Integration from Visual Studio 6

Recently, the SourceSafe integration into visual studio has started to perform badly because we have moved, and the SourceSafe "server" is located across a VPN which goes across a slow connection. This has made loading large projects in visual c++ 6 take 5+ minutes because it has to talk to the "server" for each project. Also, there are some bugs that are dangerous in the integration (the auto-checkout of certain shared projects will do a get latest on the wrong version of a branched file). This has caused me to want to disable the SourceSafe integration, however I have not found any menu option or uninstall option. Google has reported a few registry tweaks, but none of them seemed to work.
Does anyone know of an easy way to remove the SourceSafe integration from Visual C++ 6, without uninstalling SourceSafe altogether?
From http://support.microsoft.com/kb/236399:
Source code control software, such as
Microsoft Visual SourceSafe, that
integrates with the Visual C++
integrated development environment
(IDE) can be configured to connect to
a source code server during Visual C++
startup. In such cases, a loss in
network connectivity will cause Visual
C++ to start up very slowly. To
improve performance, either ensure
proper network connectivity or disable
the source code control software
integration with the Visual C++ IDE.
To do the latter, quit Visual C++, and
then use RegEdit.Exe to locate the
following registry key and set its
Disabled value to (DWORD) 0x00000001:
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Source Control\Disabled
I followed this and it seemed to work upon trying it again. I think I might've had a second copy of visual studio running when I did it the first time.
Open the .dsp and .dsw file in a text editor, and remove the respective entries from the .dsp and the .dsw file. Also, delete the .scc files.
There is a Microsoft Knowledge Base article about how to do exactly this.
The gist of it is that you must manually edit the .dsw and .dsp files in a text editor, and remove a few other files lying around. See the article for more details.
If the solutions mentioned above fail for you do this:
Rename folder: \Program Files\Microsoft\%vs%\Common7\IDE\VS SCC
VS will complain once about plug in not being there and you say "Yes" to ignore it in perpetuity.
All files “got latest,” “read only,” and edited in VS, will make VS complain and offer to “override”, which works fine for me.
What do you gain:
Open VSS-linked solutions quickly without VS matching contents to VSS server.
Open VSS-linked solutions and EDIT the files at will without being bogged down in “check out” bs.
This makes using other distributed source control system on top of project tree with VSS bindings painless.
VSS client still works by itself just fine, including diff, checkout, checkin.
HKEY_CURRENT_USER\Software\Microsoft\DevStudio\6.0\Source Control\Disabled
I followed this and it seemed to work upon trying it again. I think I might've had a second copy of visual studio running when I did it the first time.
Its working .....Thanks Ajay
What has worked for us, and is much easier, requires no registry/file editing by hand, and safer I think is this:
1) Exit Visual Studio completely.
2) Disconnect from the network (unplug the cable and turn off wireless, or disable the network adapters)
3) Open the VS6 workspace (DSW) for the project. When it starts up it will find it cannot connect with the VSS database it wants to and ask you about that...
4) Tell VS to never try to reconnect to the source control db in the future.
5) Done... VS does all the changes to THAT WORKSPACE/PROJECT setup for you. You are not disconnecting VS from source control in general (like a registry edit would do) and your not manually editing files.

Resources