Linux runtime failure

Stimulsoft Reports.WEB discussion
Ryan Robar
Posts: 30
Joined: Fri Sep 20, 2019 3:46 pm
Location: Canada

Re: Linux runtime failure

Post by Ryan Robar »

Hello,

There is some code in our solution that adds components to reports at runtime. In 2020.5.1 we had to use System.Drawing there, including for some Fonts. I was able to reduce the usage of System.Drawing to just be some Enums by changing to Stimulsoft.Drawing classes where possible. This seems to have resolved the issue. Here are the ones I had to leave behind:
  • System.Drawing.FontStyle.Bold
  • System.Drawing.StringTrimming.EllipsisCharacter
  • System.Drawing.Text.HotkeyPrefix.None
  • System.Drawing.Printing.PaperKind (Various sizes in this Enum were used)
I also removed all uses of the System.Drawing.Color struct. Fortunately all of the places we used those were optional and the default color was the one we wanted anyway. Can you tell me if you're planning to remove these eventually? The code does run now as-is, but it gets warnings in Visual Studio due to System.Drawing not technically being compatible outside of Windows.

Thanks
Lech Kulikowski
Posts: 7333
Joined: Tue Mar 20, 2018 5:34 am

Re: Linux runtime failure

Post by Lech Kulikowski »

Hello,

In NetCore we use the Stimulsoft.Drawing assembly, which contains our wrappers over graphical objects (Pen, Brush, Font and etc.). If you need to create objects for the report, use classes from this assembly.

We have not replaced Enum yet, so as not to degrade compatibility between different versions of the product. Visual Studio swears, of course, but everything works for now. When it stops working - then we will solve this problem.

Thank you.
Post Reply