VS 2022 not opening Sql Database sqlproj

Paul Hunter 0 Reputation points
2025-03-07T04:10:52.7366667+00:00

I was recently issued a new laptop. The prior laptop VS 2017 upgrade--> 2019 upgrade-->2022.
We have multiple SQL Database Project used to manage our ... database projects.
On the new laptop I installed VS 2022 and checked to include the SQL Server Data Tools project. I did the same for the VS Build Tools 2019.

Now the Database projects no longer load.
In all of the .sqlproj files there is this section
User's image

I think the issue may reside here, but I'm not sure.
Has anyone encountered and resolved this?

Visual Studio Extensions
Visual Studio Extensions
Visual Studio: A family of Microsoft suites of integrated development tools for building applications for Windows, the web and mobile devices.Extensions: A program or program module that adds functionality to or extends the effectiveness of a program.
252 questions
0 comments No comments
{count} votes

4 answers

Sort by: Most helpful
  1. Tianyu Sun-MSFT 33,471 Reputation points Microsoft External Staff
    2025-03-07T07:28:17.4833333+00:00

    Hello @Paul Hunter ,

    Thank you for sharing the screenshot.

    I agree with you. The issue should be related to the properties in project files.

    I see $(VisualStudioVersion) and 11.0, as you are using Visual Studio 2022, the number/version should be 17.0(details: Fields).  

    The path is incorrect. I suggest you check your project files(.sqlproj) and try to manually change 11.0 to 17.0. See if this works.

    User's image

    Best Regards,

    Tianyu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    0 comments No comments

  2. Paul Hunter 0 Reputation points
    2025-03-07T15:13:23.5+00:00

    @Tianyu Sun-MSFT
    I changed from 11 to 17 and tired reloading the project. That didn't work and generated the ActivityLog.Setup.xml file which I've attached as ActivityLog.Setup_v17.zip.xml (remove .xml ... it's a zip)

    One link I'd ignored was about Pre-MSBuild projects. It looks to fit my situation - a clean build of VS 2022 version 17.13 - and I need v 17.12 in order to convert them.


  3. Paul Hunter 0 Reputation points
    2025-03-10T13:48:35.3133333+00:00

    Thanks for the question Tianyu Sun-MSFT.

    I uninstalled VS 17.13, installed VS 17.12. I was then able to "reload with dependencies", and finished by updating back to VS 17.13. My assumption is that my old laptop had upgraded sequentially over time, so the issue never surfaced. My new laptop started off with the latest version.

    Thanks for your assistance.

    0 comments No comments

  4. Michael Taylor 57,136 Reputation points
    2025-03-10T14:06:05.8466667+00:00

    The snippet of project file you posted is fine. Even on VS 2022 it still contains this code for older VS versions. You didn't really tell us what error you're getting, which would help identify the issue. The output window in VS should tell you what failed.

    Most likely your project file contains old stuff in it that is causing an issue with the newer extension. There are 2 approaches you can take here I think.

    The first option is to create a new database project in VS 2022. Then open the project files in a text editor and compare them. My gut instinct is that the base properties in the PropertyGroup for the configuration/platform has a value that is bad. For example it might still be referencing an older version of NET Framework which would likely cause the load to fail. Update your existing database project to ensure its properties line up. If there are extra properties then you could consider commenting them out for now. Then try to reload the project.

    If that doesn't work, or you are fine leaving the old project behind, create a new database project in VS 2022. Then copy all the project items from the old project to the new one. To make this easier you can create the new database project and then move the project file to the same directory as the current project. Once you've moved everything then delete the old project file. Be sure to wipe out any bin, obj directories and any cache files that are generated. Then try reloading the project.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.