-
Notifications
You must be signed in to change notification settings - Fork 79
Build issue in Release mode (Linking SDK Assemblies) #92
Comments
Before I start digging into this, did you ensure you did a full clean/delete bin/rebuild? |
Yes i have done full clean/delete bin/rebuild and even nuget downgraded / upgraded the package as well |
Any update on the above issue |
I have this issue too, I tried everything to solve it, nothing helped me. Please @ChaseFlorell, try to fix it. Thanks. |
Still facing the same issue in different solutions as well |
I'm also facing this issue. VS Community 2019 16.0.3; Tests on a newly created Blank App and the Xfx.Controls.Example(from this source, referencing library directly) changing only XF version: Blank App
Example App
So, the PR is said to be merged on XF 3.6.0 but it starts to fail if we reference XF 3.5.0.274416 which in fact does not contain the LayoutChange EventHandler on the interface. Then I tried updating the Xfx.Controls XF reference to versions >= 3.5.0.274416 and it succeeded on these scenarios:
While Xfx is not updated to a newer XF version, I went in search of a workaround for my project, tried configuring custom linking, overwriting XfxCardViewRenderer and using falseflag but nothing worked. I hope my info helps on this. 😄 |
Having the same issue here, the only way to make it work is not to linked assemblies on the android project settings, but of course, these will raise the APK size quite a fair amount. |
+1 with the same problem when upgrading to Xamarin 4 starts giving Linker errors |
MDemetrio did a great job detailing the bug, so please fix it quickly I have the same problem when running on Xamarin.Forms.3.6.0.344457 In debug mode there's no error, but in release mode there are linking erros |
+1 with same problem in debug mode too with XF 4.1. Visual Studio 2019 16.2.0 and latest XFx control. |
Me too facing the same problem .. any updates ? |
I have the same problem... Any solution? |
I have the same issue. |
This issue is related to #44 , Please @ChaseFlorell is it possible, provide us a solution. The only way to make it work is not to linked assemblies on the android project settings, but of course, these will raise the APK size quite a fair amount. as @eamiguinho said. Thanks in advance. |
I have this error, any solution? |
Yes there is a solution.
|
Thanks @fchihe , i will try to do. |
Thanks @fchihe this worked for us. |
We were able to fix this issue following this process;
|
We are using the XfxControls package in a Xamarin.Forms app (Droid and iOS). The Xamarin Forms version is 3.6.0.293080. When we try to compile our primary Droid platform project, we get a build error that the "LinkAssemblies task failed unexpectedly." The actual build error is quoted below. When we build the project in "Debug" mode, it works fine. If we select "Don't Link" in the Linker Behavior section of the Droid project options in the Release configuration, the build completes.
Version Number of Control: 1.1.3 / 1.2.1
Device Tested On: Debug Working
Simulator Tested On: N/A
Affects
iOS - Not Tested Yet
Android (Min version API19, target version API28, Xamarin Android version 9, SDK Tools version 26.1.1, SDK Platform Tools version 28.0.1, SDK Build Tools version 27.0.3)
Expected Behavior
Project compiles without any linker errors
Actual Behavior
Droid project compilation fails with linker exception like this:
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: The "LinkAssemblies" task failed unexpectedly.
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: Mono.Linker.MarkException: Error processing method: 'System.Void Xfx.Controls.Droid.Renderers.XfxCardViewRendererDroid::Xamarin.Forms.Platform.Android.IVisualElementRenderer.add_LayoutChange(System.EventHandler1<Android.Views.View/LayoutChangeEventArgs>)' in assembly: 'Xfx.Controls.Droid.dll' ---> Mono.Cecil.ResolutionException: Failed to resolve System.Void Xamarin.Forms.Platform.Android.IVisualElementRenderer::add_LayoutChange(System.EventHandler1<Android.Views.View/LayoutChangeEventArgs>)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.HandleUnresolvedMethod(MethodReference reference)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.MarkMethod(MethodReference reference)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessMethod(MethodDefinition method)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessQueue()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: --- End of inner exception stack trace ---
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessQueue()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.ProcessPrimaryQueue()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Steps.MarkStep.Process()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at MonoDroid.Tuner.MonoDroidMarkStep.Process(LinkContext context)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Mono.Linker.Pipeline.Process(LinkContext context)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at MonoDroid.Tuner.Linker.Process(LinkerOptions options, ILogger logger, LinkContext& context)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Xamarin.Android.Tasks.LinkAssemblies.Execute(DirectoryAssemblyResolver res)
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Xamarin.Android.Tasks.LinkAssemblies.Execute()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Microsoft.Build.BackEnd.TaskExecutionHost.Microsoft.Build.BackEnd.ITaskExecutionHost.Execute()
\2017\Community\MSBuild\Xamarin\Android\Xamarin.Android.Common.targets(2129,5): error MSB4018: at Microsoft.Build.BackEnd.TaskBuilder.d__26.MoveNext()
The text was updated successfully, but these errors were encountered: