visual-studio 无法将 SourceSafe 数据库添加为 Visual Studio 2010 源代码管理
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/2835007/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Cannot add SourceSafe Database as Visual Studio 2010 source control
提问by Dean
My issue is that I cannot add SourceSafe Database for source control within Visual Studio 2010.
我的问题是我无法在 Visual Studio 2010 中为源代码管理添加 SourceSafe 数据库。
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.
我们的团队最初在 Visual Studio 2010 中使用 VSS 进行源代码控制。在评估 TFS 期间,我将源代码控制切换到 TFS。需要几周时间才能对 TFS 做出决定,所以我需要将我的源代码控制切换回 VSS。但是我现在无法在 Visual Studio 中添加 SourceSafe 数据库。
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.
在 Visual Studio 2010 中重现的步骤: 1) 通过工具->选项->源代码管理->插件设置-->高级或通过文件->源代码管理访问“Open SourceSafe Database”表单 2) 可用列表数据库是空白的,所以我选择“浏览”。3) 我浏览到 VSS 数据库的 srcsafe.ini 文件并选择它。
4) 系统提示我确认数据库名称 - 单击确定。5) 数据库未出现在“Open SourceSafe”数据库表单中。可用数据库的列表仍然是空白的。
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.
请注意,我可以直接使用 VSS 在 Visual Studio 之外添加数据库。但是,我通过 VSS 添加的数据库不会出现在 Visual Studio 表单中。
I'm suspicious that this is related to "down-grading" from TFS to VSS which may not have been heavily tested at MS.
我怀疑这与从 TFS 到 VSS 的“降级”有关,这可能没有在 MS 上进行过大量测试。
Any assistance is appreciated.
任何帮助表示赞赏。
采纳答案by Dean
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.
我不相信我的 VS 安装已损坏。我确实相信 VS 2010 中存在一个错误,它不允许我在使用 TFS 后使用 VSS 进行源代码控制。对我来说幸运的是,我们的团队决定继续使用 TFS 来控制我们项目的源代码。我从来不需要解决这个问题。我相信仅重新安装 Visual Studio 就足以解决问题。
回答by visual
I installed VS2010, then i install VSS, then i have the same problem, cant connect to my VSS it by default opens (TFS)
我安装了 VS2010,然后我安装了 VSS,然后我遇到了同样的问题,无法连接到我的 VSS 它默认打开(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
这里的建议,重新安装,听起来不太好,做了更多的搜索,发现了这个:- http://social.msdn.microsoft.com/Forums/en/vssourcecontrol/thread/6c927805-bca6-445b-b406-0a0da8fa21d3
and found the easy solution that 'CletusLoomis' is looking for:
并找到了“CletusLoomis”正在寻找的简单解决方案:
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"
- 打开VS2010,然后选择菜单:Tools->Options,然后点击“Souce Control”
- 单击文本“当前源控制插件”下的下拉框,使用“无”,而不是“Microsoft Visual Source Safe”
thats it, problem solved! :)
就是这样,问题解决了!:)
hope this helps someone else who found this page via google.
希望这可以帮助通过谷歌找到这个页面的其他人。
回答by timmi4sa
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
我的 Visual Studio 2010 有非常相似的症状:在选项中选择了 Visual SourceSafe 2005 我有唯一的菜单选项: 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...
按照“visual”提供的步骤(截至 2010 年 11 月 30 日 8:00),我找到了以下注册表项,需要将其切换为 0 才能在 Visual Studio 2010 中显示 SourceSafe 菜单选项。一旦注册表项值更改为零,需要重新启动 Visual Studio 并且 .. 瞧!现在我有一个额外的菜单选项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
注册表项如下(对于 32 位操作系统,需要稍作修改): HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\SourceSafe\Namespace Extension\DisableOpenFromSourceControl
Now, why it was disabled by default is beyond me.
现在,默认情况下禁用它的原因超出了我的理解。
回答by Luiz Ricci
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.
为此,您必须以管理员身份运行 Visual Studio 2010。只需使用右键单击图标,转到属性,兼容性,在屏幕底部您应该标记以管理员身份运行此程序。
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
路易斯·里奇
回答by jrummell
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.
您的 VS 安装可能已损坏。我建议卸载 VSS、VS 和 TFS,然后重新安装 VS 和 VSS。不幸的是,这可能需要 4 个多小时,但它应该可以解决您的问题。
回答by user1244612
I had the same problem with Windows 7, Visual Studio 2010 and VSS. I noticed several things:
我在 Windows 7、Visual Studio 2010 和 VSS 上遇到了同样的问题。我注意到几件事:
- 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.
- 作为独立程序的 VSS 始终在我的系统上运行。
- 如果 UAC 级别最低,但不是默认的 UAC 级别,VSS 在我的项目中完美运行。
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.
如果我使用 VSS 源代码控制打开项目文件,Visual Studio 会尝试读取注册表。它无法在拒绝访问的情况下读取/写入注册表中的键。因此,我将 SourceSafe 注册表项中的权限更改为所有用户的完全访问权限。现在,VSS 在我的系统上完美运行,具有默认的 UAC 安全级别。
回答by Hiren
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.
我正在使用 Visual Studio 2010 并且我的项目已添加到 Visual SourceSafe 6.0 我的机器上也没有提示 VSS 数据库列表。
After a number of attempts for over 3 hours. Finally got a solution.
经过3个多小时的多次尝试。终于有了解决办法。
I run the VS2010 using Run As Administrator option. The VSS database list was visble.
我使用以管理员身份运行选项运行 VS2010。VSS 数据库列表可见。
I think the issue might be due to Access Rights of Registry in Windows 7.
我认为这个问题可能是由于 Windows 7 中的注册表访问权限造成的。
回答by Steve Cross
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.
这意味着管理员组中的任何人都不必获得批准(以管理员身份运行的可怕运行)即可成为管理员。可以在本地设置如上或域范围内。为我们解决了很多问题。
回答by Jon Koeter
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.
我的设置为 Microsoft Visual Source Safe (Internet),并且应该是 Microsoft Visual Source Safe。
回答by HATCHA
First, make sure you can view the database by visual source safe explorer. Then, trying to proceed with these step...
首先,确保您可以通过visual source safe explorer查看数据库。然后,尝试继续执行这些步骤...
- Open Visual studio as Administrator.
- Log in visual source safe by the database path. (it still disappears the database in "Available database" list.)
- 以管理员身份打开 Visual Studio。
- 通过数据库路径登录visual source安全。(它仍然会消失“可用数据库”列表中的数据库。)

