I updated my monogame to 3.4, then changed to platform target to 4.0+, and downloaded some platform version in sdk manager.
Now when I’m building in release mode, I keep getting this kind of error. I’m not sure what I did but it was all working fine in monogame 3.2.
Error 19 The "LinkAssemblies" task failed unexpectedly.
Mono.Cecil.ResolutionException: Failed to resolve OpenTK.Graphics.ES20.PixelInternalFormat
at Mono.Linker.Steps.MarkStep.MarkType(TypeReference reference)
at Mono.Linker.Steps.MarkStep.MarkField(FieldReference reference)
at Mono.Linker.Steps.MarkStep.InitializeFields(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeType(TypeDefinition type)
at Mono.Linker.Steps.MarkStep.InitializeAssembly(AssemblyDefinition assembly)
at Mono.Linker.Steps.MarkStep.Initialize()
at Mono.Linker.Steps.MarkStep.Process(LinkContext context)
at Mono.Linker.Pipeline.Process(LinkContext context)
at MonoDroid.Tuner.Linker.Process(LinkerOptions options, LinkContext& context)
at Xamarin.Android.Tasks.LinkAssemblies.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.<ExecuteInstantiatedTask>d__1.MoveNext()
Any response or help would be appreciated.
EDIT:
working fine when building in Debug mode
Everythings working with 3.2.
Same error in 3.3
Have you tried changing the linker behavior to not link anything in Release? Of course this will increase the size of your application, but I think it’s a good diagnostic step.
That’s awesome, able to build in release mode now.
Though it followed with different error when packaging before deploying, still trying to look.
System.Exception: The “BuildApk” task failed unexpectedly.
System.ArgumentException: An item with the same key has already been added.
at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
at Ionic.Zip.ZipFile._InternalAddEntry(ZipEntry ze)
at Ionic.Zip.ZipFile.AddFile(String fileName, String directoryPathInArchive)
at Xamarin.Android.Tasks.BuildApk.AddNativeLibrary(ZipFile apk, String path, String abi)
at Xamarin.Android.Tasks.BuildApk.AddNativeLibraries(ZipFile apk)
at Xamarin.Android.Tasks.BuildApk.Execute()
at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
at Microsoft.Build.BackEnd.TaskBuilder.d__1.MoveNext()