Serenity icon indicating copy to clipboard operation
Serenity copied to clipboard

Migrate to .NET 6 (.NET 5 and Visual Studio 2019 support will be dropped)

Open volkanceylan opened this issue 2 years ago • 2 comments

.NET 5 is a "current" version e.g. not a "LTS (Long Term Support)" version and Microsoft will officially drop support after May 8, 2022:

https://dotnet.microsoft.com/en-us/platform/support/policy

We are moving Serene / StartSharp and Serenity.Net.Web to .NET 6 and dropping support for .NET 5 as well. So the last Serenity version based on .NET 5 will probably be 5.2.4.

As .NET 6 is not supported in Visual Studio 2019, this also means you need to use Visual Studio 2022.

Migrating to .NET 6:

Just update all Serenity packages as usual to 6.0.0.

Change target framework to net6.0 in YourProject.csproj:

<TargetFramework>net6.0</TargetFramework>

Also update these references as shown:

    <PackageReference Include="EPPlus" Version="4.5.3.3" />
    <PackageReference Include="FluentMigrator.Runner" Version="3.3.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.NewtonsoftJson" Version="6.0.2" />
    <PackageReference Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="6.0.2" />
    <PackageReference Include="Microsoft.Data.Sqlite" Version="6.0.3" />
    <PackageReference Include="Microsoft.TypeScript.MSBuild" Version="4.6.2">

Replace:

using var md5 = new MD5CryptoServiceProvider();

with

using var md5 = MD5.Create(); 

This should do it.

We'll be adding a migration guide to https://serenity.is/docs and stargen upgrade next week.

volkanceylan avatar Mar 26 '22 08:03 volkanceylan

I do not see a migration guide yet at https://serenity.is/docs. When do you expect this will be ready?

ibrahimGit123 avatar Jun 17 '22 17:06 ibrahimGit123

I dont have an estimate date yet. But I started work on, will be ready soon as possible.

VictorTomaili avatar Jun 21 '22 08:06 VictorTomaili

Any news about the guide? The simple instructions at the top are not enough... Any sleekgrid is blank, after upgrading, throughout the entire application.

Thank you.

gsaielli avatar Oct 03 '22 12:10 gsaielli

Nothing too much complicated on this upgrade. The document is updated but not published yet. https://github.com/serenity-is/docs/blob/master/migration/v5-2-3-to-v6-0-0.md

For the blank grid, check this discussion https://github.com/serenity-is/Serenity/discussions/6536

VictorTomaili avatar Oct 03 '22 12:10 VictorTomaili

i installed latest serene template in vs -2022 .when creating new project this error happens "dotnet sergen servertypings" exit code 1.how to resolve this ?

nahidulislam-cse15 avatar May 29 '23 03:05 nahidulislam-cse15