We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date
close icon

System.TypeInitializationException' in mscorlib.ni.dll

Hi,

I tried to reproduce the insctructions given here (Creating simple application with SfDataGrid) but I get the following exception: "'System.TypeInitializationException' in mscorlib.ni.dll".

The StackTrace of the InnerException is:
   at Windows.ApplicationModel.Resources.ResourceLoader.GetForViewIndependentUse(String name)
   at Syncfusion.UI.Xaml.Grid.SR..ctor()
   at Syncfusion.UI.Xaml.Grid.SR.GetLoader()
   at Syncfusion.UI.Xaml.Grid.SR.GetString(CultureInfo culture, String name)
   at Syncfusion.UI.Xaml.Grid.GridResourceWrapper.get_GroupDropAreaText()
   at Syncfusion.UI.Xaml.Grid.SfDataGrid..cctor()

and the message is:
"ResourceMap Not Found."

Would you have an idea?

Regards,



2 Replies

PD Pierre-Christophe DUS July 27, 2016 11:19 PM UTC

Finally after having added the the SfDatagrid through Xaml, the "Syncfusion Controls for UWP XAML" has been added and it works.
But I don't understand why it doesn't work with the DLL that are referenced in your article (Syncfusion.Data.UWP, Syncfusion.SfGrid.UWP, Syncfusion.SfInput.UWP, Syncfusion.SfShared.UWP)...

In add is there a way to force the Grid to take all the available space as width?




JG Jai Ganesh S Syncfusion Team July 28, 2016 11:00 AM UTC

Hi Christophe, 
 
We suspect that you have referred the assemblies from the following location which is causing the problem, 
 
C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\Universal Windows\10.0\SDK\References\CommonConfigurationeutral 
 
Can you refer the assemblies from the below location and let us know the status? 
 
C:\Program Files (x86)\Syncfusion\Essential Studio\14.2.0.26\Assemblies for Universal Windows\10.0 
 
Also this exception is due to retrieving of localization resources file but, it is not possible to avoid this exception in WinRT/UWP platforms. But you can overcome this exception by including that resource file in your application/sample.      
 
 
In the above sample, we have added the Resource file to avoid the exception.   
 
You can get the default resource file from the below UG link,   
 
Regards, 
Jai Ganesh S 


Loader.
Live Chat Icon For mobile
Up arrow icon