using GroupSummaryRows give me the error System.Reflection.MissingRuntimeArtifactException in release

Exceção gerada: 'System.Reflection.MissingRuntimeArtifactException' em System.Private.Reflection.Core.dll

This object cannot be invoked because it was metadata-enabled for browsing only: 'System.Func<System.Linq.Expressions.Expression<System.Func<System.String,System.Object,System.Object>>,System.String,System.Object,System.Double>.Invoke(System.Linq.Expressions.Expression<System.Func<System.String,System.Object,System.Object>>,System.String,System.Object)' For more information, please visit http://go.microsoft.com/fwlink/?LinkID=616867

adding to default.rd.xml stops the error, but summarize remains blank

  <Library Name="Syncfusion.DataSource.Portable">

    <Type Name="System.Linq.EnumerableExecutor{System.Int32}" Dynamic="Required Public" />

    <Type Name="System.Collections.ObjectModel.ObservableCollection{}" Dynamic="Required Public" />

    <Namespace Name="System.Linq" Dynamic="Required All" />

  </Library>

xaml

<datagrid:sfdatagrid.groupsummaryrows>

<datagrid:gridgroupsummaryrow showsummaryinrow="True" title="Total Pacotes Registado: {PacotesFecho} , a Faturar {PacotesFaturar} de {numDocFecho} Fecho(s)">

<datagrid:gridgroupsummaryrow.summarycolumns>

<datagrid:gridsummarycolumn name="PacotesFecho" mappingname="PacotesFecho" format="{}{Sum}" summarytype="DoubleAggregate">

</datagrid:gridsummarycolumn>

<datagrid:gridsummarycolumn name="PacotesFaturar" mappingname="PacotesFaturar" format="{}{Sum}" summarytype="DoubleAggregate">

</datagrid:gridsummarycolumn>

<datagrid:gridsummarycolumn name="numDocFecho" mappingname="numDocFecho" format="{}{Count}" summarytype="CountAggregate">

</datagrid:gridsummarycolumn>

</datagrid:gridgroupsummaryrow.summarycolumns>

</datagrid:gridgroupsummaryrow>

<br><br>></datagrid:sfdatagrid.groupsummaryrows>


Attachment: print_4e9918d8.zip

9 Replies

LN Lakshmi Natarajan Syncfusion Team September 6, 2021 12:57 PM UTC

Hi Antonio, 
 
Thank you for using Syncfusion products. 
 
We have checked the reported query “using GroupSummaryRows give me the error System.Reflection.MissingRuntimeArtifactException in release” from our side. We would like to inform you that we could reproduce the reported scenario when enabling Compile with .NET Native tool chain in the UWP project. We are currently analyzing the reported scenario at our side. We will check and update you further details on or before September 9, 2021. We appreciate your patience until then. 
 
Lakshmi Natarajan 
 



KK Karthikraja Kalaimani Syncfusion Team September 9, 2021 02:08 PM UTC

Hi Antonio, 

Sorry for the inconvenience caused. 

We need some more time to analyze the issue in source level. So, we will update the further details on or before 14th September 2021. We appreciate your patience until then. 

Regards,
Karthik Raja


AN Antonio September 10, 2021 07:35 PM UTC

ok
thanks for the reply



KK Karthikraja Kalaimani Syncfusion Team September 13, 2021 04:10 AM UTC

Hi Antonio, 

Thanks for the update. 

We will update the further details on 14th September 2021. We appreciate your patience until then. 

Regards,
Karthik Raja


KK Karthikraja Kalaimani Syncfusion Team September 14, 2021 12:29 PM UTC

Hi Antonio, 

We regret for the inconvenience. 

We suspect that this issue causes due to the linking of the package. Currently, we are working with high priority to find the root cause and solution for issue and we need some time to find the exact root cause of the issue and we will validate and update you further details on or before 16th September 2021. We appreciate your patience until then. 

Regards,
Karthik Raja 


MA Mohanram Anbukkarasu Syncfusion Team September 16, 2021 01:50 PM UTC

Hi Antonio, 

We regret for the inconvenience. 

We are still working on this to find the cause for issue. We are in need of some more time to validate this. We will update the further details on or before 21th September 2021. We appreciate your patience and understanding. 

Regards,
Mohanram A. 



KK Karthikraja Kalaimani Syncfusion Team September 21, 2021 07:45 AM UTC

Hi Antonio,

Thanks for the update.

We suspect that you have not included the SfDataGrid's assemblies with Xamarin Forms while initializing the Xamarin forms on App.Xaml.cs.
Due to this, the SfDatagrid is not renderer properly with .net native tool chain. Please refer to the below code snippets to overcome the issue.

Code snippets :
// In App.xaml.cs protected override void OnLaunched(LaunchActivatedEventArgs e){ rootFrame.NavigationFailed += OnNavigationFailed;

// you should add `using System.Reflection;`
List<Assembly> assembliesToInclude = new List<Assembly>();
//Now, add all the assemblies your app uses
assembliesToInclude.Add(typeof(Syncfusion.SfDataGrid.XForms.UWP.SfDataGridRenderer).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(Syncfusion.SfNumericTextBox.XForms.UWP.SfNumericTextBoxRenderer).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(Syncfusion.XForms.UWP.ComboBox.SfComboBoxRenderer).GetTypeInfo().Assembly);
// replaces Xamarin.Forms.Forms.Init(e);
Xamarin.Forms.Forms.Init(e, assembliesToInclude); }
Please let us know if you require further assistance from us.

Regards,
Karthik Raja



AN Antonio September 25, 2021 07:41 PM UTC

i have that on project uwp in the app.xaml.cs file

 protected override void OnLaunched(LaunchActivatedEventArgs e)

        {

            // Do not repeat app initialization when the Window already has content,

            // just ensure that the window is active

            if (!(Window.Current.Content is Frame rootFrame))

            {

                // Create a Frame to act as the navigation context and navigate to the first page

                rootFrame = new Frame();


                rootFrame.NavigationFailed += OnNavigationFailed;


                List<Assembly> assembliesToInclude = new List<Assembly>();

                assembliesToInclude.Add(typeof(SfButtonRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfButtonRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfScheduleRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfScheduleRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfSegmentedControlRenderer).GetTypeInfo().Assembly);


                assembliesToInclude.Add(typeof(SfChatRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfChatRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfMaskedEditRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfMaskedEditRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfPickerRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfPickerRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfKanbanRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfTabViewRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfAutoCompleteRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfBusyIndicatorRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfNumericUpDownRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfListViewRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfDataGridRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfCalendarRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfChartRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfGaugeRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfLinearGaugeRenderer).GetTypeInfo().Assembly);

                Xamarin.Forms.Forms.Init(e, assembliesToInclude);


                Xamarin.Forms.DependencyService.Register<ToastNotification>();

                ToastNotification.Init();

                if (e.PreviousExecutionState == ApplicationExecutionState.Terminated)

                {

                    //TODO: Load state from previously suspended application

                }


                // Place the frame in the current Window

                Window.Current.Content = rootFrame;

            }


            if (rootFrame.Content == null)

            {

                //To deploy the chart in Release mode, you need to initialize the chart assemblies in App.xaml.cs in UWP project as shown in the below code snippets.

                List<Assembly> assembliesToInclude = new List<Assembly>();

                assembliesToInclude.Add(typeof(SfButtonRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfButtonRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfScheduleRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfScheduleRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfSegmentedControlRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfSegmentedControlRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfChatRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfChatRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfMaskedEditRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfMaskedEditRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfPickerRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfPickerRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfKanbanRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfKanbanRenderer).GetTypeInfo().Assembly);


                assembliesToInclude.Add(typeof(Syncfusion.SfChart.XForms.UWP.SfChartRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(Syncfusion.SfGauge.XForms.UWP.SfGaugeRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(Syncfusion.SfDataGrid.XForms.UWP.SfDataGridRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(Syncfusion.SfNumericTextBox.XForms.UWP.SfNumericTextBoxRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(Syncfusion.XForms.UWP.ComboBox.SfComboBoxRenderer).GetTypeInfo().Assembly);

                assembliesToInclude.Add(typeof(SfCalendarRenderer).GetTypeInfo().Assembly);

                Xamarin.Forms.Forms.Init(e, assembliesToInclude);


                // When the navigation stack isn't restored navigate to the first page,

                // configuring the new page by passing required information as a navigation

                // parameter



                rootFrame.Navigate(typeof(MainPage), e.Arguments);

            }

            // Ensure the current window is active

            Window.Current.Activate();

        }



KK Karthikraja Kalaimani Syncfusion Team September 27, 2021 12:41 PM UTC

Hi Antonio, 

Thanks for the update. 

We have checked the reported issue in SfDataGrid version (19.2.0.62) and  Xamarin forms version (4.5.0.617). And the SfDataGrid is loading perfectly with group summary in release and debug mode. We have attached the tested sample for your reference. 

Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/GettingStarted408863157.zip

Please check the sample and still if you are facing the same issue ? Please modify the sample based on your scenario and revert us back with clear replication procedure. 

Regards,
Karthik Raja

Loader.
Up arrow icon