Posted 5 September 2023, 8:44 am EST - Updated 5 September 2023, 8:51 am EST
Treemap Gdip
Posted by: nzd on 5 September 2023, 8:44 am EST
-
-
Posted 6 September 2023, 2:54 pm EST
Hi,
Thank you for reporting the issue. We are able to replicate the issue with the Linux container and it has been forwarded to the concerned team with the internal tracking ID C1XAML-34965.
We will let you know as we get an update on this.
Regards,
Manish Gupta -
Posted 7 September 2023, 7:12 am EST
Hello again,
It’s probably related to the System.Drawing .NET 7 depreciation:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/7.0/system-drawing#old-behaviorRegards,
Nikolas -
Posted 7 September 2023, 7:38 am EST
Hello Nikolas,
Yes, you are correct, the Syste,.Drawing.Common support has been ended for non-windows OS by MS.
The detailed information can be found here:
https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only#reason-for-changeSo you may use the suggested workaround https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only#recommended-action or install libgdi library:
# install libgdiplus RUN apt-get update && apt-get install -y libgdiplus
Hope it helps!Regards,
Manish Gupta -
Posted 7 September 2023, 8:17 am EST
Hello,
The workaround you linked only applies to .NET 6, but we are using 7. So I will need using libgdi library, but I would also like not to install it later on.
Regards,
Nikolas -
Posted 7 September 2023, 11:46 pm EST
Hello Nikolas,
Along with installing the libgdiplus library, we also need to add the file runtimeconfig.template.json to the root of the project with the following content:{ "configProperties": { "System.Drawing.EnableUnixSupport": true } }
Please refer to the attached sample for reference:Regards,
Manish Gupta -
Posted 8 September 2023, 2:52 am EST - Updated 8 September 2023, 2:57 am EST
Hello Manish,
That’s what we have been doing for .NET 6, but we are now running .NET 7. Please see attached image of .NET 7 MS documentation, and link if needed.
Regards,
Nikolas -
Posted 8 September 2023, 6:51 am EST
Hello Nikolas,
The sample shared previously is created using NET 7.0 and executed on Linux Docker and it works fine.
It uses the JSON file along with installing the libgdiplus library. Also, the team is trying to find an alternative for the System.Drawing.Common library but we are not sure how much time it would take to complete this research and implementation.
Regards,
Manish Gupta -
Posted 8 September 2023, 7:06 am EST
Hello Manish,
Thanks, I’ll try.
And please let me know when there is anything new.
Regards,
Nikolas