I am attempting to generate a code map using Visual Studio 2017 Enterprise, but receive the following error:
Note the data source: Data Source=(LocalDB)\MSSQLLocalDB. When I search for MSSQLLocalDB in my solution, nothing comes up. My application does not use SQL Server 2016 (which is what I think the connection string is for). It uses 2012. All my connection strings use (localdb)\v11.0.
Fixes I've attempted / notes:
Visual Studio is up to date:
I have seen this issue. Not only is that problem for VS2012, the solutions are for web.config. My app is a desktop app, so no web.config. But none of the projects' app.config contain a reference to (LocalDB)\MSSQLLocalDB anyway.
Thinking that it might have to do with the latest version of SSDT (15.8.1) no longer supporting SQL Server 2012, I checked the version. It is 15.1.6:
Visual Studio is running on Windows 7 Ultimate, SP1, 64-bit.
EDITS
I am using SQL Server express with Local DB.
The issue does not appear to be related to connection strings. Following basic instructions for creating an SSDT project (here), and importing the database (noting that in step 6 I target SQL Server 2012), the issue still remains - no connection strings, and no actual code.
I have also verified that SQL Server 2012 is the only connected server:
Error message added for SEO purpose (the question was not findable on search engines)
The XML content in this document cannot be viewed as a graph because it contains unexpected errors. Open the XML Editor to fix these errors and then try re-opening the graph. The actual error found is described below. Unable to connect to the specified database. An exception occurred attempting to connect to a database using the following connection string : Data Source=(LocalDB)\MSSQLLocalDB : Attach DbFilename=;Initial Catalog=master Integrated Security=True;Enlist=False;Asynchronous Processing=True; MultipleActive ResultSets=True Connect Timeout=30. Check that the specified SQL Server instance exists and the service is running. Call Stack : at Microsoft.Repository.SqlInteraction. OpenAndConfigureConnection (SqlConnection connection) Microsoft.Repository.SqlInteraction.<>c__DisplayClass7_0.<UsingConnection>b_0 () at at Microsoft.Repository.SqlInteraction.ExecuteRepositoryAction (Action action) at Microsoft.Repository.SqlInteraction. UsingConnection (SqlConnection sqlConnection, Action`1 act) at Microsoft.Repository.SqlInteraction. UsingMasterConnection (String connectionString, Action`1 act) at Microsoft. Repository. Utilities.GetDbStateAndFileNames (SqlConnectionStringBuilder builder) at Microsoft.Repository. Utilities.GetDatabase State (String connectionString) at Microsoft.VisualStudio. Architecture Tools. Progressive Reveal. PRUtilities. CanQuery (ActionContext context, IProgressionCacheSettings settings) at Microsoft.VisualStudio. ArchitectureTools. Progressive Reveal.GetRepositoryTimestamps Command.Execute (ActionContext context, IGraphStatus status Reporter, IProgressionCacheSettings settings) at Microsoft.VisualStudio. Architecture Tools. ProgressiveReveal. Progressive RevealProvider. GetRepositoryTimestampsHandler (ActionContext context) at Microsoft.VisualStudio. Progression. ActionManager. CallNormalActions (Action action, ActionContext actionContext, Boolean propagateCancellation)
I had the same issue with VS 2019. My solution was to delete and recreate the database MSSQLLocalDB
. The cause was probably that my account didn't have rights to open the DB, maybe because my admin installed Visual Studio with his account.
Here the steps to recreate the DB:
"C:\Program Files\Microsoft SQL Server\130\Tools\Binn\SqlLocalDB.exe"
.SqlLocalDB.exe i
shows all database instances.SqlLocalDB.exe d MSSQLLocalDB
SqlLocalDB.exe c MSSQLLocalDB
Now I can use VS code maps and I can open the DB in the SQL Server Object Explorer in VS.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With