每当我创建一个新的依赖图时,使用visual studio 2012终极版我会收到此错误:
Unable to connect to the specified database.
An exception occurred attempting to connect to a database using the following connection string:
Data Source=(LocalDB)\v11.0;AttachDbFilename=;Initial Catalog=master;
Integrated Security=True;Enlist=False;
Asynchronous Processing=True;MultipleActiveResultSets=True;Connect Timeout=30.
Check that the specified SQL Server instance exists and the service is running.
Run Code Online (Sandbox Code Playgroud)
我的解决方案正确构建,我的连接字符串是这样的:
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=.;Initial Catalog=JewelryStore;Integrated Security=SSPI;" providerName="System.Data.SqlClient" />
</connectionStrings>
Run Code Online (Sandbox Code Playgroud)
这里有什么问题?
我正在尝试使用 Visual Studio 2017 Enterprise 生成代码映射,但收到以下错误:
请注意数据源:Data Source=(LocalDB)\MSSQLLocalDB。当我在我的解决方案中搜索 MSSQLLocalDB 时,什么也没有出现。我的应用程序不使用 SQL Server 2016(这是我认为连接字符串的用途)。它使用 2012。我所有的连接字符串都使用 (localdb)\v11.0。
我尝试过的修复/注释:
我见过这个问题。不仅是 VS2012 的问题,解决方案也适用于 web.config。我的应用程序是桌面应用程序,所以没有 web.config。但无论如何,项目的 app.config 都不包含对 (LocalDB)\MSSQLLocalDB 的引用。

Visual Studio 在 Windows 7 Ultimate、SP1、64 位上运行。
编辑
我正在将 SQL Server express …