.NET 6

Posts   
 
    
DvK
User
Posts: 318
Joined: 22-Mar-2006
# Posted on: 17-Mar-2022 13:45:23   

Hi, we upgraded our solution to .NET6 with LLBLGen 5.9.1. But now ORM Profiler is not working anymore due to exceptions regarding the BinaryFormatter.

How to proceed?

Kind regards, Danny

Attachments
Filename File size Added on Approval
2022-03-17_13-43-29.jpg 111,258 17-Mar-2022 13:45.31 Approved
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 17-Mar-2022 14:24:09   

I found this out yesterday indeed, that they have removed BinaryFormatter from .net 6 completely. This is problematic as the profiler's data transport is based on binary serialization. So fixing this requires the redesign of the data transport system. It's a lot of data, so the first alternative, json serialization, is likely going to be a terrible choice. So at the moment we don't have a solution, we have to look into how to fix this. There are some options...

We'll try UTF8 json serialization first, to see if that is doable.

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 17-Mar-2022 17:55:15   

We have a Json -> UTF8 solution working now, but sadly it will cause friction as the new client doesn't seem to be able to deserialize .NET 4.x data (data that's serialized with binary formatter), even tho the types are the same.

So people have to upgrade client + interceptor. Data is bigger too, but .net 6 is faster so it's not that big of a deal. We'll do some more testing tomorrow (Friday) and see if everything works fine so we can push a new build

Frans Bouma | Lead developer LLBLGen Pro
DvK
User
Posts: 318
Joined: 22-Mar-2006
# Posted on: 18-Mar-2022 10:16:21   

Hi Frans, great to hear that you have a working solution in progress. Let us know if you need any feedback or testing on our side to speed up the process. We're quite reliant on the Profiler to investigate issues and performance bottlenecks within our solution.

Regards, Danny

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 18-Mar-2022 14:09:40   

We've finalized the code, using Json.net Bson serialization for .net core / .net 6 and also made the rest work as-is, so new interceptors and client and we're good to go. Should be out later this afternoon simple_smile

Frans Bouma | Lead developer LLBLGen Pro
Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 18-Mar-2022 14:21:39   

All tests succeed, so we pushed a new build. Please download the client v2.0.4 from the My Account -> Downloads section, and pull new ormprofiler packages from nuget (once their slow server has approved them) and it should work out of the box.

They do come with a dependency on NewtonSoft.Json/NewtonSoft.Json.Bson, but as that's in basically every app nowadays that shouldn't be a problem. If it is, please let us know.

Frans Bouma | Lead developer LLBLGen Pro
DvK
User
Posts: 318
Joined: 22-Mar-2006
# Posted on: 20-Mar-2022 12:50:10   

Thanks for the effort and quick response. I'll download the new bits and let you know how it works out.

Regards, Danny