Issue running stimulsoft in Linux with .net 6
-
- Posts: 9
- Joined: Thu May 09, 2019 9:37 pm
Issue running stimulsoft in Linux with .net 6
Hello,
I run my app that uses stimulsoft in Linux. After updating to .net 6 I get this error.
Exception has been thrown by the target of an invocation.The type initializer for 'Gdip' threw an exception.System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information
stackTrace
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at Stimulsoft.Base.StiActivator.CreateObject(Type type)
at Stimulsoft.Base.Serializing.StiSerializing.GetObjectFromType(String typeStr)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.Deserialize(Object obj, Stream stream, String application)
at Stimulsoft.Report.SaveLoad.StiXmlReportSLService.Load(StiReport report, Stream stream)
at Stimulsoft.Report.StiReport.Load(StiReportSLService service, Stream stream)
at Stimulsoft.Report.StiReport.Load(Stream stream)
at Stimulsoft.Report.StiReport.Load(String path)
Is there any fix for this error?
I run my app that uses stimulsoft in Linux. After updating to .net 6 I get this error.
Exception has been thrown by the target of an invocation.The type initializer for 'Gdip' threw an exception.System.Drawing.Common is not supported on non-Windows platforms. See https://aka.ms/systemdrawingnonwindows for more information
stackTrace
at System.RuntimeType.CreateInstanceDefaultCtor(Boolean publicOnly, Boolean wrapExceptions)
at Stimulsoft.Base.StiActivator.CreateObject(Type type)
at Stimulsoft.Base.Serializing.StiSerializing.GetObjectFromType(String typeStr)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.DeserializeObject(XmlTextReader tr, String parentPropName)
at Stimulsoft.Base.Serializing.StiSerializing.Deserialize(Object obj, Stream stream, String application)
at Stimulsoft.Report.SaveLoad.StiXmlReportSLService.Load(StiReport report, Stream stream)
at Stimulsoft.Report.StiReport.Load(StiReportSLService service, Stream stream)
at Stimulsoft.Report.StiReport.Load(Stream stream)
at Stimulsoft.Report.StiReport.Load(String path)
Is there any fix for this error?
-
- Posts: 6265
- Joined: Tue Mar 20, 2018 5:34 am
Re: Issue running stimulsoft in Linux with .net 6
Hello,
Starting with .Net6, the GDI+ library will only be supported on Windows.
So the System.Drawing.Common package will no longer be included in NetCore for Unix systems.
On Unix systems, you can still install the separate Nuget package System.Drawing.Common from .Net5.
But starting with Net7 it seems this won't work either, just throwing a PlatformNotSupportedException.
here is a link to an article by the dotnet authors:
https://github.com/dotnet/designs/blob/ ... in-only.md
Thank you.
Starting with .Net6, the GDI+ library will only be supported on Windows.
So the System.Drawing.Common package will no longer be included in NetCore for Unix systems.
On Unix systems, you can still install the separate Nuget package System.Drawing.Common from .Net5.
But starting with Net7 it seems this won't work either, just throwing a PlatformNotSupportedException.
here is a link to an article by the dotnet authors:
https://github.com/dotnet/designs/blob/ ... in-only.md
Thank you.
-
- Posts: 9
- Joined: Thu May 09, 2019 9:37 pm
Re: Issue running stimulsoft in Linux with .net 6
Hello,
I will try installing the separate nugget. I purchased stimulsoft in the past because it was the first .net core report engine working on Linux.
What are you plans about this issue? Shouldn't you make an official announcement about it, with your future plans?
Thank you
I will try installing the separate nugget. I purchased stimulsoft in the past because it was the first .net core report engine working on Linux.
What are you plans about this issue? Shouldn't you make an official announcement about it, with your future plans?
Thank you
-
- Posts: 6265
- Joined: Tue Mar 20, 2018 5:34 am
Re: Issue running stimulsoft in Linux with .net 6
Hello,
Yes, we are working on that task right now. The solution will be provided as fix build as fas as possible.
At the current moment, you can use the solution from the previous post.
Thank you.
Yes, we are working on that task right now. The solution will be provided as fix build as fas as possible.
At the current moment, you can use the solution from the previous post.
Thank you.
-
- Posts: 9
- Joined: Thu May 09, 2019 9:37 pm
Re: Issue running stimulsoft in Linux with .net 6
Hello
Do you have any update on this issue? I couldn't find anything in release notes.
Is System.Drawing.Common replaced?
Do we still need the "hack" with the System.Drawing.EnableUnixSupport?
https://www.stimulsoft.com/en/blog/arti ... ting-tools
Do you have any update on this issue? I couldn't find anything in release notes.
Is System.Drawing.Common replaced?
Do we still need the "hack" with the System.Drawing.EnableUnixSupport?
https://www.stimulsoft.com/en/blog/arti ... ting-tools
-
- Posts: 6265
- Joined: Tue Mar 20, 2018 5:34 am
Re: Issue running stimulsoft in Linux with .net 6
Hello,
We work hard on this problem and do our best to do it as fast as possible. We will let you know when the solution is available.
Thank you.
We work hard on this problem and do our best to do it as fast as possible. We will let you know when the solution is available.
Thank you.
Re: Issue running stimulsoft in Linux with .net 6
Fixed in .NET 6 AspNetCore WebApi with
AppContext.SetSwitch("System.Drawing.EnableUnixSupport",true);
the runtimeconfig.json did not work for us
AppContext.SetSwitch("System.Drawing.EnableUnixSupport",true);
the runtimeconfig.json did not work for us
-
- Posts: 6265
- Joined: Tue Mar 20, 2018 5:34 am
Re: Issue running stimulsoft in Linux with .net 6
Hello,
Thank you for the information.
Thank you for the information.
Re: Issue running stimulsoft in Linux with .net 6
Hello Lech,
Do you have any update on this issue ?
The EnableUnixSupport is not longer supported in .net 7 https://docs.microsoft.com/en-us/dotnet ... ded-action
Alex
Do you have any update on this issue ?
The EnableUnixSupport is not longer supported in .net 7 https://docs.microsoft.com/en-us/dotnet ... ded-action
Alex
-
- Posts: 6265
- Joined: Tue Mar 20, 2018 5:34 am
Re: Issue running stimulsoft in Linux with .net 6
Hello,
Yes. We make our new own library. It will be available in the next major release 2022.3.1 in June.
Thank you.
Yes. We make our new own library. It will be available in the next major release 2022.3.1 in June.
Thank you.