.NET 5.0 Errors

Stimulsoft Reports.Net discussion
Lech Kulikowski
Posts: 3437
Joined: Tue Mar 20, 2018 5:34 am

Re: .NET 5.0 Errors

Post by Lech Kulikowski » Wed Feb 10, 2021 11:38 am

Hello,

There are some improvements and fixes in that direction. Please check the next release within one or two weeks.

Thank you.
HighAley
Posts: 8368
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: .NET 5.0 Errors

Post by HighAley » Fri Feb 12, 2021 12:39 pm

Hello,

Please, check the latest build.
It should work now.

Thank you.
User avatar
ednt
Posts: 61
Joined: Tue Apr 30, 2019 9:03 am

Re: .NET 5.0 Errors

Post by ednt » Fri Feb 26, 2021 8:18 am

We are sry, but with the new Version 2021.1.1 we got still the same error :(
Lech Kulikowski
Posts: 3437
Joined: Tue Mar 20, 2018 5:34 am

Re: .NET 5.0 Errors

Post by Lech Kulikowski » Mon Mar 01, 2021 7:55 am

Hello,

Please send us a sample project that reproduces the issue for analysis.

Thank you.
User avatar
ednt
Posts: 61
Joined: Tue Apr 30, 2019 9:03 am

Re: .NET 5.0 Errors

Post by ednt » Mon Mar 01, 2021 8:56 am

This example will show the problem. It just takes a minute.

1. Create a new WinForms .NET 5 app with the current Visual Studio 2019 (v16.8.6). (".NET" and not the old ".NET Framework")
2. In the IDE, right click the project folder, click on properties and set the target framework to .NET 5 and set the start-object to your Program.cs.
3. then right click your project again and go to nuget packages. Click on search and add the packages Stimulsoft.Dashboards.Win(v2021.1.1) and Stimulsoft.Reports.Net(v2021.1.1)
4. Now double click the Program.cs in your project-explorer and add this 2 lines of code to the end of your main mehtod in the Program.cs:
var dashViewer = new Stimulsoft.Dashboard.Viewer.StiDashboardViewerForm();
var stiReport = new Stimulsoft.Report.StiReport();
5. Click "save all" into your project (STRG + SHIFT + S and NOT just STRG + S, its important!)
6. Run this command in the root of your solution folder:
dotnet publish -o bin\Release -r win-x64 -c Release --self-contained true -p:PublishTrimmed=true -p:PublishReadyToRun=true -p:PublishSingleFile=true /p:DebugType=None /p:DebugSymbols=false

Now you should see the full Error in your command line.
Happy fixing ;)
Lech Kulikowski
Posts: 3437
Joined: Tue Mar 20, 2018 5:34 am

Re: .NET 5.0 Errors

Post by Lech Kulikowski » Tue Mar 02, 2021 11:05 am

Hello,

This doesn't seem to be our problem. Our code works fine.
The problem occurs when publishing the project in the .Net5 environment, the system Mono.Linker crashes when PublishTrimmed=true, if you set false - it works.
So, Mono.Linker is processing assemblies somehow, and some code has some internal error that causes it to crash.

We can see the code fragment it doesn't work, but we don't know what exactly it doesn't work. We can only guess.

Here is a link to a similar problem with the same error code:
https://github.com/mono/linker/pull/1759
In this case, the problem is in the Mono.Linker code, something was fixed by the developers, and only a month ago.
Maybe in our case, the problem is similar or even the same, but maybe the fix has not reached the release yet.

Thank you.
User avatar
ednt
Posts: 61
Joined: Tue Apr 30, 2019 9:03 am

Re: .NET 5.0 Errors

Post by ednt » Tue Mar 02, 2021 12:58 pm

This makes sense.
Thank you for your explaining.
Then we will wait for the .NET 5 update from Microsoft which will include the Mono fix.

Thank you!
HighAley
Posts: 8368
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: .NET 5.0 Errors

Post by HighAley » Tue Mar 02, 2021 1:30 pm

Hello,

We are always glad to help you.
Do not hesitate to contact us if you need help.

Thank you.
Post Reply