Notice (2018-05-24): bugzilla.xamarin.com is now in
Please join us on
Visual Studio Developer Community and in the
Mono organizations on
GitHub to continue tracking issues. Bugzilla will remain
available for reference in read-only mode. We will continue to work
on open Bugzilla bugs, copy them to the new locations
as needed for follow-up, and add the new items under Related
Our sincere thanks to everyone who has contributed on this bug
tracker over the years. Thanks also for your understanding as we
make these adjustments and improvements for the future.
Please create a new report on
Developer Community or GitHub with
your current version information, steps to reproduce, and relevant error
messages or log files if you are hitting an issue that looks similar to
this resolved bug and you do not yet see a matching new report.
The project ZXing.Net.Mobile has a Xamarin Forms version of the popular ZXing barcode scanning library. The library uses custom view renderers for each platform. Each platform works in Debug builds, but Windows UWP platform doesn't work when the compile option "Compile with .NET native tool chain" is enabled.
Without this option enabled, Xamarin forms is able to construct the custom renderers via reflection, however, with this option enabled, throws a "FileNotFound" exception during the initialization of the Application.
Here is a call stack from the exception being thrown in th Sample Forms application in that project when compiling the UWP app in release.
System.Private.Reflection.Core.dll!System.Reflection.Runtime.Assemblies.RuntimeAssembly.GetRuntimeAssembly(Internal.Reflection.Core.ReflectionDomain reflectionDomain, System.Reflection.Runtime.Assemblies.RuntimeAssemblyName assemblyRefName) Line 46 C#
System.Private.Reflection.Core.dll!System.Reflection.Runtime.General.ReflectionCoreCallbacksImplementation.Load(System.Reflection.AssemblyName refName) Line 45 C#
System.Private.Reflection.dll!System.Reflection.Assembly.Load(System.Reflection.AssemblyName assemblyRef) Line 114 C#
Xamarin.Forms.Core.dll!Xamarin.Forms.Registrar.RegisterAll(System.Type attrTypes) Unknown
Xamarin.Forms.Platform.UAP.dll!Xamarin.Forms.Forms.Init(Windows.ApplicationModel.Activation.IActivatedEventArgs launchActivatedEventArgs, System.Collections.Generic.IEnumerable<System.Reflection.Assembly> rendererAssemblies) Unknown
WindowsUniversal.exe!WindowsUniversal.App.OnLaunched(Windows.ApplicationModel.Activation.LaunchActivatedEventArgs e) Line 65 C#
Please try adding the dll to the list of assemblies to include, as per the instructions here:
Does this resolve your issue?
Because we have not received a reply to our request for more information we are closing this issue. If you are still encountering this issue, please reopen the ticket with the requested information. Thanks!