Project throws exception while running on Windows Server 2019 Datacenter

I'm currently trying to deploy a updated version of an application that was developed internally.
With this new version we tried using SfDataGrid to have more functionalities compared to the Community Tool DataGrid.


The application update was developed and tested in a Windows 11 Pro environment.
I have just discovered that it doesn't run without throwing an exception in a Windows Server 2019 Datacenter Version 1809 Build 17763.7009 with Desktop Experience running in on a VM.

The application was running without any problems before we tried updating it to SfDataGrid.

Here is the stack trace:

System.TypeInitializationException: The type initializer for 'Syncfusion.UI.Xaml.DataGrid.SfDataGrid' threw an exception.


---> System.TypeInitializationException: The type initializer for 'Syncfusion.UI.Xaml.Grids.GridLocalizationResourceAccessor' threw an exception.


---> System.Runtime.InteropServices.COMException (0x80073B20)

   at WinRT.ExceptionHelpers.<ThrowExceptionForHR>g__Throw|38_0(Int32 hr)

   at WinRT.ExceptionHelpers.ThrowExceptionForHR(Int32 hr)

   at ABI.Windows.ApplicationModel.Resources.Core.IResourceManagerStaticsMethods.get_Current(IObjectReference _obj)

   at Windows.ApplicationModel.Resources.Core.ResourceManager.get_Current()

   at Syncfusion.UI.Xaml.Grids.GridLocalizationResourceAccessor..ctor()

   at Syncfusion.UI.Xaml.Grids.GridLocalizationResourceAccessor..cctor()

   --- End of inner exception stack trace ---

   at Syncfusion.UI.Xaml.DataGrid.SfDataGrid..cctor()

   --- End of inner exception stack trace ---

   at Syncfusion.UI.Xaml.DataGrid.SfDataGrid..ctor()

   at GenerateurCodeStandard.GenerateurCodeStandard_XamlTypeInfo.XamlTypeInfoProvider.Activate_41_SfDataGrid() in C:\Users\s.dekreijger\Documents\Generateur server\Generateur_Technord\GenerateurCodeStandard\obj\x64\Debug\net6.0-windows10.0.19041.0\XamlTypeInfo.g.cs:line 761

   at GenerateurCodeStandard.GenerateurCodeStandard_XamlTypeInfo.XamlUserType.ActivateInstance() in C:\Users\s.dekreijger\Documents\Generateur server\Generateur_Technord\GenerateurCodeStandard\obj\x64\Debug\net6.0-windows10.0.19041.0\XamlTypeInfo.g.cs:line 11844

   at ABI.Microsoft.UI.Xaml.Markup.IXamlType.Do_Abi_ActivateInstance_13(IntPtr thisPtr, IntPtr* result)


Attachment: Generateur_Syncfusion_3b0e04a.zip

3 Replies

RM Rabina Murugan Syncfusion Team March 19, 2025 12:57 PM UTC

Hi  Sebastien De Kreijger,
We attempted to run the sample you provided, but encountered an error indicating that the .appxrecipe file does not exist, which usually occurs when the project has not been built or the necessary build files are missing.
To proceed further, could you kindly provide us with the executable project or kindly ensure that the project is built successfully. This will help us investigate the issue more efficiently.
Looking forward to your response.
Regards,
Rabina 


SD Sebastien De Kreijger replied to Rabina Murugan March 19, 2025 02:25 PM UTC

Hi Rabina Murugan,

The sample that I have provided previously is supposed to run as unpackaged.

Since my first post I have tried creating a smaller sample in a brand new project which I tried to run as packaged this time.
The new sample projet seems to be running without any problems on Windows Server 2019 Datacenter on my virtual machine.

I will try to copy my original project files to a new WinUI3 packaged project to see if I can manage to finally run it on my virtual machine.

I will keep you updated on how it goes.

Please also find bellow the new smaller project sample which worked successfully.

Thank you for your help !


Attachment: Syncfusion_sample_2_4e1d134b.zip


RM Rabina Murugan Syncfusion Team March 20, 2025 07:55 AM UTC

Hi  Sebastien De Kreijger ,
Thank you for the update. We appreciate your efforts in creating a simple sample and verifying it on your virtual machine.
Please proceed with copying your original project files to the new WinUI3 packaged project and test it on your end. Kindly keep us informed on your progress.
We’ll be happy to assist further if you encounter any issues. Looking forward to your updates.
Regards,
Rabina 

Loader.
Up arrow icon