SQL Server Express 2019 with Visual Studio 2019

Ian Taylor 41 Reputation points

I have a project with a SQL database that is deployed on a Server running SQL Server Express 2015. I now have a new server and I am trying to open the existing project in Visual Studio 2019 Community and deploy on the new Server via SQL Server Express 2019. Whilst I have successfully attached the SQL Database to the new server under SQL Sever Express 2019, I cannot access this via Visual Studio Community 2019 running on a PC. Visual Studio says the database cannot be opened because it is version 904. The server supports version 852 and earlier. I have tried reinstalling with just SQL Server Express 2019 but the same message. How do I work with a 2019 database on VS ?

SQL Server
SQL Server
A family of Microsoft relational database management and analysis systems for e-commerce, line-of-business, and data warehousing solutions.
13,067 questions
0 comments No comments
{count} votes

Accepted answer
  1. Erland Sommarskog 103.5K Reputation points MVP

    Visual Studio mainly has my head spinning, but I think the issue is that VS wants to use localdb, and is picking up an older version of SQL Server. I think that VS 2019 comes with SQL 2017 and not SQL 2019. (Because VS 2019 was released before SQL 2019 went RTM.)

    Open a command-line window and run

    sqllocaldb info
    sqllocaldb version

    to see which instances versions of sqllocaldb you have installed. If you say

    sqllocaldb info instance

    You get more detailed info on that instance, including version.

    I think Express installs sqllocaldb automatically. You could delete the instance that VS uses and create a new one based on SQL 2019. Use the help option with sqllocaldb to see the commands for this.

    0 comments No comments

0 additional answers

Sort by: Most helpful