visual-studio 如何删除存储在 Visual Studio 中的数据库连接字符串?
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/1276674/
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
HowTo delete the Database ConnectionStrings stored in Visual Studio?
提问by gsharp
I have Visual Studio 2005 Team Edition for DB Professionals.
我有适用于 DB 专业人员的 Visual Studio 2005 团队版。
After starting "Data --> Schema Compare --> New Schema Comparison...", i can choose a database from a DropDown. Unfortunately there are some old references that i don't need anymore. How can i delete those entries?
启动“数据 --> 模式比较 --> 新模式比较...”后,我可以从下拉列表中选择一个数据库。不幸的是,有一些我不再需要的旧参考资料。我怎样才能删除这些条目?
回答by gsharp
I did recognize that the connections are stored in the Server Explorer. "View --> Server Explorer". The Data Connections stored there can be deleted.
我确实认识到连接存储在服务器资源管理器中。“查看 --> 服务器资源管理器”。可以删除存储在那里的数据连接。
回答by RudyCo
You can manage them from the registry: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SSDT\ConnectionMruList
您可以从注册表管理它们:HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SSDT\ConnectionMruList
回答by Bhaskar
Yes can view your added schemas in the "Server Explorer" in Visual Studio. Just, right-click the schema and delete it.
是的,可以在 Visual Studio 的“服务器资源管理器”中查看添加的架构。只需右键单击架构并将其删除。
回答by John
In the select schema connection window, click edit connection for the connection you don't want. The set it to a connection you already have and still want, this tricks it into removing itself.
在选择架构连接窗口中,单击您不需要的连接的编辑连接。将它设置为您已经拥有并且仍然想要的连接,这会诱使它自行删除。
It's the only way I've got them to remove!
这是我让它们删除的唯一方法!
回答by Joe Schmoe
For Visual Studio 2015 MRU connections are stored here: HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\ConnectionMruList
对于 Visual Studio 2015 MRU 连接存储在此处:HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\14.0\ConnectionMruList
回答by George Mpopo
I am using Visual Studio 2012. I have clicked on Project and Select the name of project on dropdown menu e.g. MyDemo Properties. On the side menu click settings then you will find connection string listed in a table then Delete those you don't need.
我正在使用 Visual Studio 2012。我点击了项目并在下拉菜单中选择项目名称,例如 MyDemo 属性。在侧面菜单上单击设置,然后您会发现表格中列出的连接字符串,然后删除不需要的那些。
回答by Mighty Ferengi
For Visual Studio 2017:
对于 Visual Studio 2017:
- Right click on your project in the Solution Explorer.
- Select Properties.
- Click the Settings option in the left menu pane.
- Right click on the connection you want to remove.
- 在解决方案资源管理器中右键单击您的项目。
- 选择属性。
- 单击左侧菜单窗格中的设置选项。
- 右键单击要删除的连接。
KerPOW! Done! Gone!
战俘!完毕!没了!
回答by Christopher Montano
You need to go into your web.config file and find the tag. You'll see all of your old and current connections in there you can delete the ones you no longer need.
您需要进入您的 web.config 文件并找到该标签。您将在其中看到所有旧的和当前的连接,您可以删除不再需要的连接。

