question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Latest 5.0.2 gives .net standard 2.1 not compatable with NETFrameworks & Mono.Linker.MarkException using 4.1.4

See original GitHub issue

Issue below occuring in Release mode on android when building project:

Upgrading to latest on this library is causing issues with my UITest project which uses NETFramework 4.6.1 .

netstandard 2.1 is not compatable with any .NETFramework: https://docs.microsoft.com/en-us/dotnet/standard/net-standard

Error is below failing my build:

 sampleApp targets 'netstandard2.1'. It cannot be referenced by a project that targets '.NETFramework,Version=v4.6.1'

Im guessing latest version on this plugin prevents referencing projects with NETFramework

I tried a work around by dropping down to version 4.1.4 but I issues (see below) which I think is the linker stripping out some classes maybe? I dont want to set linking to none but if this is a linker issue any ideas how to fix this? Again guessing I need a line to the proguard.cfg to keep some classes?

Mono.Linker.MarkException: Error processing method: 'System.Void SampleApp.Droid.Resource::UpdateIdValues()' in assembly: 'SampleApp.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Int32 Plugin.LocalNotification.Resource/Attribute::coordinatorLayoutStyle

Full exception:

Severity	Code	Description	Project	File	Line	Suppression State
Error		Mono.Linker.MarkException: Error processing method: 'System.Void SampleApp.Droid.Resource::UpdateIdValues()' in assembly: 'SampleApp.Android.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Int32 Plugin.LocalNotification.Resource/Attribute::coordinatorLayoutStyle
   at Mono.Linker.Steps.MarkStep.HandleUnresolvedField(FieldReference reference)
   at Mono.Linker.Steps.MarkStep.MarkField(FieldReference 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()	SampleApp.Android	C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets	1942	

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
LeoJHarriscommented, Mar 31, 2020

Ill send a sample project as i am unable to get the build working unfortunately. Ill try get something this week.

0reactions
thudugalacommented, Apr 2, 2020

I think Android 10 is only a issue for UITest.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to use a .Net Standard 2.1 DLL in .Net Framework 4.8?
Net Core 3.1 (LTS), or Mono instead of Framework 4.8 in your project. UPDATE: Another possible workaround: You might also attempt some trickery ......
Read more >
NET Standard
Learn about .NET Standard, its versions, and the .NET implementations that support it.
Read more >
Will .NET Standard Support .NET 6? - Microsoft Q&A
I have an open source library that currently targets .NET Standard 2.1 which is compatible with .NET 5.0.
Read more >
Issues with .NET Standard 2.0 with .NET Framework & NuGet
NET Framework 4.6.1 can consume NuGet packages & projects targeting .NET Standard 2.0 or earlier. Unfortunately, we've seen a few issues around ...
Read more >
Please stop lying about .NET Standard 2.0 support!
In this post I have a bit of a rant about Microsoft's NuGet packages lying about supporting .NET Standard 2.0 when they kinda...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found