Hi Guys,
while having not tested anything right now in this direction - is there an plan or current status about XAF supporting net7 on Linux?
DevExpress.Drawing Graphics Library — v22.2 Update — SkiaSharp for .NET 6/7 and Linux Support (CTP)
Hi Guys,
while having not tested anything right now in this direction - is there an plan or current status about XAF supporting net7 on Linux?
DevExpress.Drawing Graphics Library — v22.2 Update — SkiaSharp for .NET 6/7 and Linux Support (CTP)
Great news! In v23.2, we eliminated use of System.Drawing.Common API references across XAF Blazor/WinForms UI and Web API Service. This allowed our cross-platform libraries to work as expected across Linux, Mac, Windows, Android, iOS for .NET 7, .NET 8 and future target frameworks. This change also simplified future development and deployment for new UI platforms, such as .NET MAUI and Blazor WebAssembly with .NET 8, 9, 10, etc. - Breaking Change.
If you own an active Universal Subscription, feel free to download our Early Access Preview (EAP) build v23.2.1 for early testing (learn more). We look forward to hearing from you.
Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.
XAF Blazor UI and Web API Service already support .NET 7 on Linux. Example: https://github.com/DevExpress/XAF-Blazor-Kubernetes-example/blob/main/XAFContainerExample.Blazor.Server/XAFContainerExample.Blazor.Server.csproj.
Thx man - we will do additional tests - was just wondering because there are still properties in XAF code which reference System.Drawing.Common.Image types - isnt that a problem? for example NodeObjectAdapter->GetImage / DashboardOrganizationItems->Preview, ImageLoader - am i missing something here?
We will await your specific issues once you have had an opportunity deploy and test XAF .NET 7 apps live.
I did a quick test - and this happens right after login- am i missing anything?
i referenced
Snippet
<PackageReference Include="DevExpress.Drawing.Skia" Version="22.2.5" /> <PackageReference Include="SkiaSharp" Version="2.88.3" /> <PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.3" />
i am running on wsl
Welcome to Ubuntu 20.04 LTS (GNU/Linux 5.10.102.1-microsoft-standard-WSL2 x86_64)
—> System.PlatformNotSupportedException: System.Drawing.Common is not supported on this platform.
at System.Drawing.Image…ctor()
at System.Drawing.Bitmap…ctor(Int32 width, Int32 height)
at DevExpress.ExpressApp.Security.SecuredActionDescriptorHelper.GetImage(String imageName)
at DevExpress.ExpressApp.Security.SecurityModule.InitializeSecuredActions(XafApplication application)
at DevExpress.ExpressApp.Security.SecurityModule.InitializeSecurityForActions(XafApplication application)
at DevExpress.ExpressApp.Security.SecurityModule.application_LoggedOn(Object sender, LogonEventArgs e)
at DevExpress.ExpressApp.XafApplication.OnLoggedOn(LogonEventArgs args)
at DevExpress.ExpressApp.XafApplication.Logon(PopupWindowShowActionExecuteEventArgs logonWindowArgs)
at DevExpress.ExpressApp.XafApplication.showLogonAction_OnExecute(Object sender, PopupWindowShowActionExecuteEventArgs args)
at DevExpress.ExpressApp.Actions.PopupWindowShowAction.RaiseExecute(ActionBaseEventArgs eventArgs)
at DevExpress.ExpressApp.Actions.ActionBase.ExecuteCore(Delegate handler, ActionBaseEventArgs eventArgs)
— End of inner exception stack trace —
at DevExpress.ExpressApp.Actions.ActionBase.OnHandleException(Exception e)
at DevExpress.ExpressApp.Actions.ActionBase.ExecuteCore(Delegate handler, ActionBaseEventArgs eventArgs)
at DevExpress.ExpressApp.Actions.PopupWindowShowAction.DoExecute(Window window)
at DevExpress.ExpressApp.Actions.PopupWindowShowAction.DialogController_Accepting(Object sender, DialogControllerAcceptingEventArgs e)
at DevExpress.ExpressApp.SystemModule.DialogController.Accept(SimpleActionExecuteEventArgs args)
at DevExpress.ExpressApp.SystemModule.DialogController.acceptAction_OnExecute(Object sender, SimpleActionExecuteEventArgs e)
at DevExpress.ExpressApp.Actions.SimpleAction.RaiseExecute(ActionBaseEventArgs eventArgs)
at DevExpress.ExpressApp.Actions.ActionBase.ExecuteCore(Delegate handler, ActionBaseEventArgs eventArgs)
We will check it next week, Noxe - it worked fine in our tests so far, probably we are missing something as well. Thank you for your feedback.
thx man - thats why i asked about the Image references initially - as my understanding was that every reference to System.Drawing.* should be switched to DXImage and so - to get this working?
Ok - so i guess the difference it that your samples do not reference
Snippet
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
we use net7 runtime and also upgrade all packages to 7.0.0 - and then you can repro the problem i guess! i did a quick downgrade now to 6.0.0 (and depending packages) - and enabled "System.Drawing.EnableUnixSupport": true - and afterwords it works.
We are double-checking out internal tests for mistakes - we will update this ticket once we have updates, thanks.
Hello, Noxe.
Our DevExpress.Data and its dependencies like DevExpress.ExpressApp rely on System.Drawing.Common 5.0 for build.

The version of the System.Drawing.Common used in your end apps fully depends on the packages you reference yourself. So, our sample https://github.com/DevExpress/XAF-Blazor-Kubernetes-example/blob/main/XAFContainerExample.Blazor.Server/XAFContainerExample.Blazor.Server.csproj operates fine under .NET 7 in Unix environments, because it references System.Drawing.Common 5.0 and no external/custom packages override this. Note that if you use Docker, you must install and use libgdiplus explicitly, because DevExpress.Drawing and Skia are not yet supported in v23.1 and older:
FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base RUN apt-get update RUN apt-get install -y libc6 libicu-dev libfontconfig1 RUN cd /usr/lib && ln -s libgdiplus.so gdiplus.dll
Had you used System.Drawing.Common 6.0 (or its dependencies like System.Security.Permissions), you would need to set
"System.Drawing.EnableUnixSupport": true
or take additional actions as per https://learn.microsoft.com/en-us/dotnet/core/compatibility/core-libraries/6.0/system-drawing-common-windows-only#recommended-action.If you explicitly reference System.Drawing.Common 7.0, then PlatformNotSupportedException is expected, at least until we remove System.Drawing.Common 5.0 from DevExpress.ExpressApp and all its dependencies OR rather support System.Drawing.Common 7.0 with Image > DXImage and other replacements from DevExpress.Drawing. As you may understand, this is a large undertaking and we have not planned this so far. This will be a huge breaking change for thousands of DevExpress customers, because Image, Font, and other System.Drawing.Common API are widely used (for instance, in ImageLoader, Conditional Appearance, etc.).
Having said that, we will likely keep the current System.Drawing.Common 5.0 dependency in our libraries until Microsoft ships security patches for it (https://dotnet.microsoft.com/en-us/platform/support/policy) and may consider to switch to System.Drawing.Common 6.0. By the time Microsoft ends support for this package version (for instance, after November 2024), we hope that we will be able to figure out how to minimize breaking changes for customers, remove .NET Standard support from current libraries, and switch to what Microsoft recommends at that time. I hope this makes sense.
Thx Dennis for the detailed answer - my initial understanding was that support for net7 - means also System.Drawing.Common 7.0 ;) so for now we can easy go with 5.0 or 6.0 - thank you!