Migrate to SDK-Style Project File

Posts   
 
    
Posts: 13
Joined: 11-Aug-2017
# Posted on: 15-Sep-2025 11:41:11   
LLBLGen 5.11.5
SelfServicing (General)
SQL Server 2017
.NET Framework 4.7.2

We busy migrating to SQL Server 2022 (Azure SQL Managed Instance) and .NET Framework 4.8 (and eventually to newer .NET).

Is there a way to set the designer to generate the project file using the new SDK-style format, and not the old verbose clunky format?

Or is that only for .NET Standard 2.0+?

"Migrate packages.config to PackageReference" and "Upgrade" -> "Convert project to SDK-style" for all the solution projects (non ASP.NET) and libraries was very easy.

Wondering if there is an easy way to set it in the Designer, or if I would need to convert it every time we regenerate the Data project, or if we need to upgrade to .NET Standard (which might have it's own issues?) and update all the other projects and libraries (sigh!).

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39928
Joined: 17-Aug-2003
# Posted on: 16-Sep-2025 09:26:40   

The designer won't overwrite a csproj file if it already exists. So you can do two things: use the netstandard2.0 preset and alter the generated csproj file to use netframework instead of netstandard20, or alter the net4.8 preset and specify the templateid for the netstandard20 vsproj template instead of the one that's currently specified. You can edit the preset files right in the designer, and e.g. save it under your own name.

In our unittests we use multitargeting and have altered the csproj files to multitarget both net452 and netstandard, then we generate the codebase using netstandard. You'll miss some files that way tho:

  • the AssemblyFileInfo classes, which are onetime generated anyway so it's not a big deal .
  • the webserviceHelperClass which is likely not needed if you don't do webservices the old way
  • the webservice schema importer which is also unlikely you'll need it.

Generating the code base again leaves the csproj files as-is because as I said the designer won't overwrite them simple_smile

Frans Bouma | Lead developer LLBLGen Pro