Page 2 of 2

Re: .NET 5.0 Errors

Posted: Wed Feb 10, 2021 11:38 am
by Lech Kulikowski
Hello,

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

Thank you.

Re: .NET 5.0 Errors

Posted: Fri Feb 12, 2021 12:39 pm
by HighAley
Hello,

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

Thank you.

Re: .NET 5.0 Errors

Posted: Fri Feb 26, 2021 8:18 am
by ednt
We are sry, but with the new Version 2021.1.1 we got still the same error :(

Re: .NET 5.0 Errors

Posted: Mon Mar 01, 2021 7:55 am
by Lech Kulikowski
Hello,

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

Thank you.

Re: .NET 5.0 Errors

Posted: Mon Mar 01, 2021 8:56 am
by ednt
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 ;)

Re: .NET 5.0 Errors

Posted: Tue Mar 02, 2021 11:05 am
by Lech Kulikowski
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.

Re: .NET 5.0 Errors

Posted: Tue Mar 02, 2021 12:58 pm
by ednt
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!

Re: .NET 5.0 Errors

Posted: Tue Mar 02, 2021 1:30 pm
by HighAley
Hello,

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

Thank you.