Removing SourceSafe Integration from Visual Studio 2008 - visual-studio

A question was asked recently about removing SourceSafe integration from Visual Studio 6. I need to do the same with Visual Studio 2008.
Our team uses Subversion and I have installed AnkhSVN, the Subversion plug-in for VS2008 (some other members of the team use VisualSVN). I find that SourceSafe "insists" on being the integrated source control tool of choice - the setting for source control plug-in in Tools > Options > Source Control seems to reset itself every time VS2008 is closed. This is very annoying and I want to get rid of SourceSafe.
I tried running the VS2008 install with the intention of switching off (effectively uninstalling) the SourceSafe plug-in, but there is no option for it.

Visual Studio stores source control preferences in the solution and project files. To switch providers, you have to first "unbind" the old provider.
Select File > Source Control > Change Source Control, select the solution and all the project files, and click "Unbind."
Save the solution.
Then you can change the provider with Tools > Options > Source Control.
Hand-editing the .sln and .proj files also works, but it's not exactly recommended.

Found it! MS's Help and Support site describes it, see section 2
Add a DWORD registry key at:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SourceSafe\HideInVisualStudio
Set it to 1. Restart VS2008 and the SourceSafe plug-in option is gone.

You can usually edit the *.sln file and *.??proj file with out an problems to remove these bindings. These two files are just text files so you can open them in Notepad, Wordpad, or Visual Studio.
Just remove stuff slowly and then save and try to load.

Not sure if this works, but you can try:
Tools/Options/Source Control: set Current Source Control plug-in to "None"
Open the solution - hopefully it will tell you the provider is missing and give you an option to remove the bindings.

There are several constraints/behaviors for my case:
1) The machine and the projects are shared by several developers and they should not be affected by my changes,
2) vs2008 automatically re-enables SourceSafe control (did not try the HideInVisualStudio registry solution because it's a global flag),
3) I can't remove the bindings in the projects nor un-install SourceSafe
So I have found a way which is not perfect but works good enough for me:
1) open regedit and go to this key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\SourceSafe
there should be an entry
SCCServerPath
which should contain something like this:
C:\Program Files\Microsoft Visual SourceSafe\ssscc.dll
2) Modify the permissions for ssscc.dll in order to DENY the "Read and Execute" access for your userid.
Now, this is not perfect because you will have sometimes an error message message when you load a solution in VS2008 (There was a failure while initializing the Microsoft Visual SourceSafe source control provider. You cannot use this provider to perform source control operations.), but the goal is achieved:
1) No more source safe integration in VS2008,
2) Source Safe standalone is still working,
3) Other users are not affected by the modification.

Related

Visual Studio 2010: "Source Control - Unable To Access Database"

Our team uses ClearCase here at work, and I absolutely despise the ClearCase Visual Studio plug-in. It is such an unnatural workflow for me. As a result, I uninstalled the ClearCase plug-in and simply use the cleartool command line utility, which has increased my productivity significantly.
However, I am now presented with a new annoyance. All our project files are configured to use Visual Studio Source Control hooks, and so when I first open the project, I get a super annoying error message:
Source Control - Unable To Access Database
The associated source control plug-in is not installed or could not be initialized.
Common causes for this error include server unavailability and/or incorrect workspace mappings.
O Temporarily work uncontrolled
o Permanentnly remove source control association bindings
Neither of the options given are what I really want to do, since the default temporarily solution bugs me every time I open a project, and the "permanent" solution hijacks my solution file.
Alternatively, I have gone to Tools -> Options -> Source Control -> Plug-in selection -> None. This still results in a Visual Studio message, albeit a slightly less annoying one.
What are my options? Is it possible to write a plug-in for Visual Studio that completely turns off this nuissance? I mean, could I write a Source Control plug-in that does nothing?
I think the issue here is Visual Studio was installed after ClearCase installation. I have faced similar issue and the only option is to un-install ClearCase and reinstall it.

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.)

Why does Visual studio 2005 prefer "none" instead of perforce as source control provider

(Formerly: Help! Sourcesafe hijacks Perforce bindings in visual studio 2005)
Hi,
I'm currently having a problem with a visual studio solution. We're using perforce as our source control provider through the binding mechanism in visual studio.
My problem is that every time I open the solution sourcesafe will hijack the bindings and show me lots of errors about not being able to find the sourcesafe database.
This problem is easily corrected by:
Unbinding the solution and all projects.
Go to options and change source control provider from sourcesafe to perforce.
Rebinding the solution and all projects.
But! I don't want to do this every time i open the solution.
Does anyone her know what's going on here? I preferrably want to fix this without removing the sourcesafe plugin altogether.
Update:
I have removed some registry entries to keep VS from discovering the sourcesafe plugin. This works since sourcesafe no longer can be found in the list of providers in the options. The funny thing is that it still won't use perforce. When I open the solution I still get the errors and the provider is set to "none" in the options dialog.
It seems that this is not a sourcesafe problem, but a visual studio problem. Does anyone know where visual studio stores its bindings on a project and solution level? I have checked the .scc and .vssscc files and found no mention of perforce. (Other than project name: "perforce project")
regards,
Yngve
Visual Studio supports only 1 Source Control at once, so you need to switch providers through options BEFORE you open the solution. (open VS, switch providers, open solution).
After a lot of digging, in the registry as well. I found a little list of source control providers under the following key:
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\SourceControl\EngineNames]
"0"="Sourcesafe"
"1"="Perforce"
After changing the order to:
[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\8.0\SourceControl\EngineNames]
"0"="Perforce"
"1"="Sourcesafe"
it correctly associates the projects with perforce. Why, you ask? I have no idea whatsoever.
Whether or not this "fix" will mess with any bindings to sourcesafe remains to be seen though.

Getting Visual Studio to ignore source control bindings in a solution

Is there a way to tell Visual Studio 2005 to just ignore source control binding when opening a solution? I sometimes need to load a solution for which I don't have access to the source control server, but Visual Studio insists on trying to connect anyway, meaning I have to click "temporarily work offline in disconnected mode" for every project in the solution (of which there are about 20) as it loads. For some reason, it also tries to check each project out immediately after I've told it to work offline, so I have to click past that dialog box too.
As I will never need to edit anything in this solution, is there any way I can open it and have Visual Studio just ignore the fact it has source control bindings in it?
Edit: Ideally, I'd like a way to do this without having to change the project/solution files. They change fairly frequently, so I'd have to redo any changes every time there was a new version (otherwise I'd just unbind them once and it wouldn't be a problem).
Thanks for the replies so far.
The source control bindings are stored in Visual Studio solution file (.sln). For TFS for example, it contains a global section for TFS information and the solution projects added to TFS. You can edit the solution file to remove these bindings manually. I would suggest making a copy of the solution file first. However, I would recommend removing bindins via Visual Studio. Open your solution and go through the offline scenario. Then go to File/Source Control/Change Source Control (VS 2008) to bring up the UI that shows you the source control bindings in your solution. There you can manage the bindings including unbinding them. Once unbound, the next time you open the solution, VS should not have a need to access the source control.
I've been looking for a way to disable Integration between SourceSafe 2005 and Visual Studio 2008. We are forced to use SourceSafe being in a corporate environment and all. SourceSafe is fine on its own if you treat it like a baby. As soon as you try to do anything approaching useful it starts to break. God forbid you try to use the integration with Visual Studio. Being that I didn't want the "Bindings removed" so that it doesn't confuse other devs on the team I needed to be able to tell Studio to ignore the solution and project bindings and continue on it's merry way.
I followed the registry hack suggested in the following post
Removing SourceSafe Integration from Visual Studio 6
Studio did what I wanted...sort of. It removed the SourceSafe integration. However when I opened up a source controlled solution it asked me if I wanted to remove the bindings.
"the projects will be treated as not under source control"
No I don't want you to remove the bindings from the files, I want you to IGNORE them. This dialog pops up every time you open the solution/project file and there is no way around it.
My solution at the moment seems to have worked...for now.
File->Source Control->Change Source Control...->Disconnect
I hope this helps anyone else in the position of having to use SourceSafe but can't remove the bindings from the files themselves. WHY, Microsoft, WHY would you put the bindings in the files themselves?
/rant

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