SQL server database project and Migration to net6

AdamJendrulek-9874 21 Reputation points

In my mvc core solution I have SQL server database project which is targeting to framework .Net framework 4.5.
After I updated all projects to. Net 6 this project didn't allow me to update it. But after merging, build failed due to error:
The reference assemblies for .NETFramework,Version=v4.5 were not found.

Is still compatible or supported sql server database project in. Net 6?

A set of technologies in the .NET Framework for building web applications and XML web services.
4,140 questions
0 comments No comments
{count} votes

Accepted answer
  1. Bruce (SqlWork.com) 55,041 Reputation points

    I assume you have a CLR component in the database project. Sql CLR does not support .net core. also CLR projects do not support .net standard class libraries. I believe you can use the portable library, but this is not supported by core after core 2.0

    you can upgrade your database project to 4.8

    if you are trying to share code between the core projects and CLR, then create a multi-target project that builds a .netstandard and a net48 library.

    the shared code will be limited to C# 7.3

    note: SSIS script packages do not support .net core.

    0 comments No comments

2 additional answers

Sort by: Most helpful
  1. Simon Boddy 6 Reputation points

    This might be interesting for anyone who finds themselves here. You can build a .dacpac from database project with modern .net frameworks.

    1 person found this answer helpful.
    0 comments No comments

  2. AdamJendrulek-9874 21 Reputation points

    With .Net 5 it worked well but now this project failed during build. I use it just to keep structure of database and changes.

    0 comments No comments