I am trying to build Xamarin Forms Android App but it's not getting compiled in Release
mode, while Debug works fine.
Error Detail:
/Library/Frameworks/Mono.framework/External/xbuild/Xamarin/Android/Xamarin.Android.Common.targets(5,5): Error MSB4018: The "LinkAssemblies" task failed unexpectedly. Mono.Linker.Steps.XmlResolutionException: Failed to process XML description: ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Prism.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' ---> Mono.Cecil.AssemblyResolutionException: Failed to resolve assembly: 'Prism.Core, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' at Mono.Cecil.BaseAssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x0015e] in /Users/builder/data/lanes/6102/8255f42f/source/monodroid/external/xamarin-android/external/mono/external/cecil/Mono.Cecil/BaseAssemblyResolver.cs:172 at Mono.Linker.AssemblyResolver.Resolve (Mono.Cecil.AssemblyNameReference name, Mono.Cecil.ReaderParameters parameters) [0x0005c] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Mono.Linker.LinkContext.Resolve (Mono.Cecil.IMetadataScope scope) [0x00007] in <947dd92f52fa43c1922f96c7b9774bdc>:0 --- End of inner exception stack trace --- at Mono.Linker.LinkContext.Resolve (Mono.Cecil.IMetadataScope scope) [0x00030] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Mono.Linker.Steps.ResolveFromXmlStep.GetAssembly (Mono.Linker.LinkContext context, Mono.Cecil.AssemblyNameReference assemblyName) [0x00000] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Mono.Linker.Steps.ResolveFromXmlStep.ProcessAssemblies (Mono.Linker.LinkContext context, System.Xml.XPath.XPathNodeIterator iterator) [0x00010] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Mono.Linker.Steps.ResolveFromXmlStep.Process () [0x00037] in <947dd92f52fa43c1922f96c7b9774bdc>:0 --- End of inner exception stack trace --- at Mono.Linker.Steps.ResolveFromXmlStep.Process () [0x000a9] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Mono.Linker.Steps.BaseStep.Process (Mono.Linker.LinkContext context) [0x00010] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Mono.Linker.Pipeline.Process (Mono.Linker.LinkContext context) [0x0001c] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at MonoDroid.Tuner.Linker.Run (Mono.Linker.Pipeline pipeline, Mono.Linker.LinkContext context) [0x00000] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at MonoDroid.Tuner.Linker.Process (MonoDroid.Tuner.LinkerOptions options, Mono.Linker.ILogger logger, Mono.Linker.LinkContext& context) [0x00071] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Xamarin.Android.Tasks.LinkAssemblies.Execute (Java.Interop.Tools.Cecil.DirectoryAssemblyResolver res) [0x002d4] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Xamarin.Android.Tasks.LinkAssemblies.Execute () [0x0021f] in <947dd92f52fa43c1922f96c7b9774bdc>:0 at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute () [0x00023] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-06/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/TaskExecutionHost/TaskExecutionHost.cs:573 at Microsoft.Build.BackEnd.TaskBuilder.ExecuteInstantiatedTask (Microsoft.Build.BackEnd.ITaskExecutionHost taskExecutionHost, Microsoft.Build.BackEnd.Logging.TaskLoggingContext taskLoggingContext, Microsoft.Build.BackEnd.TaskHost taskHost, Microsoft.Build.BackEnd.ItemBucket bucket, Microsoft.Build.BackEnd.TaskExecutionMode howToExecuteTask) [0x001f6] in /Users/builder/jenkins/workspace/build-package-osx-mono/2018-06/external/bockbuild/builds/msbuild-15/src/Build/BackEnd/Components/RequestBuilder/TaskBuilder.cs:784 (MSB4018) (VSTSBuild.Droid)
Also I noticed that it's building in Release
mode as well if I enable 'Use Shared Mono Runtime' but if it's disabled then I am having issue building the solution.