Visual Studio 2012 终极新依赖图错误 [英] visual studio 2012 ultimate new dependency graph error
问题描述
使用 Visual Studio 2012 Ultimate 每次创建新的依赖图时都会收到此错误:
working with visual studio 2012 ultimate everytime i create a new dependency graph i get this error :
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.
我的解决方案得到正确构建,我的连接字符串是这样的:
my solution get build properly and my connection string is something like this :
<connectionStrings>
<add name="DefaultConnection" connectionString="Data Source=.;Initial Catalog=JewelryStore;Integrated Security=SSPI;" providerName="System.Data.SqlClient" />
</connectionStrings>
这里有什么问题?
推荐答案
您的问题很可能是您的 localDB 实例的问题:
Your issue is likely a problem with your localDB instance at:
%localappdata%\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0
我遇到了同样的问题,因为当我安装 VS12 时,我的计算机不在域中,而且我最近将它加入了域,而我的用户帐户没有访问 SQL DB 的权限.
为了解决我跑的问题
I had the same problem because when I installed VS12 my computer was not in a domain and I recently joined it to a domain and my user account does not have permissions to the SQL DB.
To fix the issue I ran
sqllocaldb stop "v11.0" -k
sqllocaldb delete "v11.0"
sqllocaldb create "v11.0"
sqllocaldb start "v11.0"
然后我重新启动了 VS 2012,我的本地数据库现在可以使用,并且现在创建了依赖关系图
I then restarted VS 2012 and my local DB is now usable and the Dependency Graph is now created
这篇关于Visual Studio 2012 终极新依赖图错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!