- Home
- Forum
- Xamarin.Forms
- Mono.Linker.MarkException SfDataGrid
Mono.Linker.MarkException SfDataGrid
Setting Linking to "Sdk Assemblies Only" gives below error when compiling.
Syncfusion version: 18.2.0.44
Xamarin Forms: 4.6.0.847
Android Compile: Android: 9.0
Android Target Version: 9.0
Android Device Android: 9.0
Error Mono.Linker.MarkException: Error processing method: 'System.Boolean Syncfusion.SfDataGrid.XForms.Droid.GridCellRenderer::checkIfSelectedRow(Syncfusion.SfDataGrid.XForms.DataColumnBase)' in assembly: 'Syncfusion.SfDataGrid.XForms.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Syncfusion.SfDataGrid.XForms.GridSelectionController Syncfusion.SfDataGrid.XForms.SfDataGrid::get_SelectionController()
at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
at Mono.Linker.Steps.MarkStep.MarkInstruction(Instruction instruction)
at Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
at Mono.Linker.Steps.MarkStep.ProcessQueue()
--- End of inner exception stack trace ---
at Mono.Linker.Steps.MarkStep.ProcessQueue()
at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
at Mono.Linker.Steps.MarkStep.Process()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
at Xamarin.Android.Tasks.LinkAssemblies.RunTask()
at Xamarin.Android.Tasks.AndroidTask.Execute() Impress.App.Android C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets 1881
SIGN IN To post a reply.
4 Replies
1 reply marked as answer
KK
Karthikraja Kalaimani
Syncfusion Team
July 16, 2020 12:57 PM UTC
Hi Michael,
Based on the provided details we have checked the reported issue “Mono.Linker.MarkException” when compiling the SfDataGrid with SKD assemblies only. We could not able to reproduce the issue in our end and it is working fine as expected. We have attached the tested sample and video for your reference.
Video link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Video1388860601.zip
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGridSample1373350445373290789.zip
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back.
Based on the provided details we have checked the reported issue “Mono.Linker.MarkException” when compiling the SfDataGrid with SKD assemblies only. We could not able to reproduce the issue in our end and it is working fine as expected. We have attached the tested sample and video for your reference.
Video link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Video1388860601.zip
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGridSample1373350445373290789.zip
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back.
Regards,
Karthik Raja
Hi Michael,
Based on the provided details we have checked the reported issue “Mono.Linker.MarkException” when compiling the SfDataGrid with SKD assemblies only. We could not able to reproduce the issue in our end and it is working fine as expected. We have attached the tested sample and video for your reference.
Video link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Video1388860601.zip
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGridSample1373350445373290789.zip
Please check the sample and let us know if you still facing the same issue? If not, please modify the sample based on your scenario and revert us back.
Regards,
Karthik Raja
Unfortunately, I wasn't able to reproduce it too on a new project with below data grid. Now the production app has Linking set to None..
<sfgrid:SfDataGrid
ItemsSource="{Binding Statements}" VerticalOverScrollMode="None"
AutoGenerateColumns="False" ShowRowHeader="False" ColumnSizer="Star" GridTapped="dataGrid_GridTapped">
<sfgrid:SfDataGrid.SortColumnDescriptions>
<sfgrid:SortColumnDescription ColumnName="tran_date"
SortDirection="Descending" />
</sfgrid:SfDataGrid.SortColumnDescriptions>
<sfgrid:SfDataGrid.CaptionSummaryTemplate>
<DataTemplate>
<StackLayout VerticalOptions="CenterAndExpand" >
<Label Text="{Binding Key, StringFormat='{0:dd MMMM}'}"
FontFamily="Montserrat-Bold"
TextColor="#102A53"
HorizontalOptions="Center" VerticalOptions="CenterAndExpand" />
</StackLayout>
</DataTemplate>
</sfgrid:SfDataGrid.CaptionSummaryTemplate>
<sfgrid:SfDataGrid.GroupColumnDescriptions>
<sfgrid:GroupColumnDescription ColumnName="tran_date" SortGroupRecords="True" />
</sfgrid:SfDataGrid.GroupColumnDescriptions>
<sfgrid:SfDataGrid.Columns x:TypeArguments="dataGrid:Columns">
<sfgrid:GridTextColumn MappingName="tran_date" Padding="30,0,0,0" HeaderText="Transaction Date" IsHidden="True" TextAlignment="Start" />
<sfgrid:GridTextColumn MappingName="reference" Padding="30,0,0,0" HeaderText="Reference" TextAlignment="Start" />
<sfgrid:GridTextColumn MappingName="amount" HeaderText="Amount" TextAlignment="End" Padding="0,0,30,0" Format="N2" >
<sfgrid:GridTextColumn.CellStyle>
<Style TargetType="dataGrid:GridCell">
<Setter Property="Foreground" Value="{Binding amount, Converter={StaticResource NegativeNumberToBoolConverter}}" />
</Style>
</sfgrid:GridTextColumn.CellStyle>
</sfgrid:GridTextColumn>
</sfgrid:SfDataGrid.Columns>
</sfgrid:SfDataGrid>
KK
Karthikraja Kalaimani
Syncfusion Team
July 20, 2020 01:02 PM UTC
Hi Michael,
Currently, we are working on your requirement. We will update further details on or before 22nd July 2020. We appreciate your patience until then.
Regards,
Karthik Raja
Currently, we are working on your requirement. We will update further details on or before 22nd July 2020. We appreciate your patience until then.
Regards,
Karthik Raja
KK
Karthikraja Kalaimani
Syncfusion Team
July 22, 2020 07:35 AM UTC
Hi Michael,
We are glad that the issue is not replicated in your new sample.
We are glad that the issue is not replicated in your new sample.
We have also tried replicating the issue based on the provided code snippet and the configurations of the android project. But we were not able to replicate the “Mono.Linker.Exception” issue.
We have attached the tested sample for your reference. So, could you please test your application with and without SfDataGrid and let us know the details? Or please do conform us that the new sample is working fine in all configurations and no more assistance is required with this regard.
Sample link : https://www.syncfusion.com/downloads/support/directtrac/general/ze/DataGridSample1373350445-462437236.zip
Regards,
Karthik Raja
Marked as answer
SIGN IN To post a reply.
- 4 Replies
- 2 Participants
- Marked answer
-
MY Michael Yui Fai Poon
- Jul 15, 2020 02:41 PM UTC
- Jul 22, 2020 07:35 AM UTC