For anyone who is struggling with this error. Set VS Link Assemblies to "None" and adapt your code. I've been looking for another workaround with that config for 2 months but nothing works. Don't waste your time, improvise, adapt overcome.
Xamarin error XALNK7000: Mono.Linker.MarkException
Hello, My app Works fine when Shared Runtime is enabled but I can't deploy it with that configuration. I'm using Visual Studio 2019 and Xamarin.Forms v5.0.0.2012
sinQ/cosQ
Gravité Code Description Projet Fichier Ligne État de la suppression
Erreur Mono.Linker.MarkException: Error processing method: 'System.String Microsoft.AspNetCore.Mvc.Razor.Internal.ViewPath::NormalizePath(System.String)' in assembly: 'Microsoft.AspNetCore.Mvc.Razor.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve Microsoft.Extensions.Primitives.InplaceStringBuilder
à Mono.Linker.Steps.MarkStep.HandleUnresolvedType(TypeReference reference)
à Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
à MonoDroid.Tuner.MonoDroidMarkStep.MarkType(TypeReference reference)
à Mono.Linker.Steps.MarkStep.MarkMethodBody(MethodBody body)
à Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
à Mono.Linker.Steps.MarkStep.ProcessQueue()
--- Fin de la trace de la pile d'exception interne ---
à Mono.Linker.Steps.MarkStep.ProcessQueue()
à Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
à Mono.Linker.Steps.MarkStep.Process()
à Mono.Linker.Steps.MarkStep.Process(LinkContext context)
à MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
à Mono.Linker.Pipeline.ProcessStep(LinkContext context, IStep step)
à Mono.Linker.Pipeline.Process(LinkContext context)
à MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
à Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
à Xamarin.Android.Tasks.LinkAssemblies.RunTask()
à Xamarin.Android.Tasks.AndroidTask.Execute() TabbedPageWithNavigationPage.Droid
1 additional answer
Sort by: Most helpful
-
Michael Han 11 Reputation points
2021-05-07T05:45:30.087+00:00 Hi I encounter the same issue today of my android project for releasing build:
Visual Studio for Mac 8.9.8 (build 7)
<PackageReference Include="Xamarin.Forms" Version="5.0.0.2012" />
<PackageReference Include="Xamarin.Essentials" Version="1.6.1" /><TargetFrameworkVersion>v10.0</TargetFrameworkVersion>
After chaning Link to "Don't Link"
then the release building is successfully.Follow steps below:
https://learn.microsoft.com/en-us/xamarin/android/deploy-test/release-prep/?tabs=macos#Versioning