Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

visual studio 2012 ultimate new dependency graph error

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>

what is the problem here?

like image 681
Amir Jalali Avatar asked Sep 19 '12 10:09

Amir Jalali


1 Answers

Your issue is likely a problem with your localDB instance at:

%localappdata%\Microsoft\Microsoft SQL Server Local DB\Instances\v11.0

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"

I then restarted VS 2012 and my local DB is now usable and the Dependency Graph is now created

like image 128
Todd Carter Avatar answered Nov 12 '22 05:11

Todd Carter