Closed faceoffers28 closed 7 years ago
Shouldn't this be enough?
assembliesToInclude.Add(typeof(ZXing.BarcodeReader).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.ZXingBarcodeImageView).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Mobile.MobileBarcodeScanner).GetTypeInfo().Assembly);
Look into your bin\Debug and bin\Release directory inside Visual Studio, to get an idea of what assemblies to include.
Always deinstall your App manually, when switching between Debug and Release, before you are running it.
@redwolf2 Interesting! Thanks for the hint in terms of where to look. Upon looking, I noticed that both features/packages that I'm having issues with have multiple DLLs in the Release bin. Please see attached image.
Zxing.Net.Mobile.Core.dll Zxing.Net.Mobile.Forms.dll Zxing.Net.Mobile.Forms.WindowsUniversal.dll zxing.portable.dll ZxingNetMobile.dll
I got the scanner to work by adding these assemblies, but I can't get the text at the top or the bottom of the scanner page to appear. Any idea which assembly controls that?
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.ZXing_Net_Mobile_WindowsUniversal_XamlTypeInfo.XamlMetaDataProvider).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingBarcodeImageViewRenderer).GetTypeInfo().Assembly);
assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingScannerViewRenderer).GetTypeInfo().Assembly);
I also noticed that my Windows 10 laptop scanner does not scan the barcode. I believe this has something to with a focus issue. It works fine on my Windows 10 mobile phone. I'm testing on a tablet, but I'm waiting for the app to download.
I just ran the Debug code on my Windows 10 mobile device and noticed that the top and bottom text does not display. This sound like a separate issue to me.
The Top and Bottom page have their own issue entry here.
I don't think that problem is assembly related.
You only need to refrerence assemblies with Xamarin.Forms renderers, which in this case should be only assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingBarcodeImageViewRenderer).GetTypeInfo().Assembly);
Shouldn't this be enough?
assembliesToInclude.Add(typeof(ZXing.BarcodeReader).GetTypeInfo().Assembly); assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.ZXingBarcodeImageView).GetTypeInfo().Assembly); assembliesToInclude.Add(typeof(ZXing.Mobile.MobileBarcodeScanner).GetTypeInfo().Assembly);
Look into your bin\Debug and bin\Release directory inside Visual Studio, to get an idea of what assemblies to include.
Always deinstall your App manually, when switching between Debug and Release, before you are running it.
Over 2 years later and this is still the way to fix.
You only need to refrerence assemblies with Xamarin.Forms renderers, which in this case should be only assembliesToInclude.Add(typeof(ZXing.Net.Mobile.Forms.WindowsUniversal.ZXingBarcodeImageViewRenderer).GetTypeInfo().Assembly);
Yes, this proved to be sufficient to fix this issue for me. Thank you!
My app works just fine in Debug mode. When I Release the app, I can't get a couple of features to work. One of the features is the Zing.Net.Mobile.Forms. I have read that you have to inject assemblies into the Xamarin.Forms.Forms.Init method, but I can't find the correctly assemblies to add. Here is what I have tried. Does anyone know the correct combination of assemblies to include to get this to work in Release mode?
I implemented a page like this in my PCL Project. https://github.com/Redth/ZXing.Net.Mobile/blob/master/Samples/Forms/Core/CustomScanPage.cs
Version info Install-Package ZXing.Net.Mobile -Version 2.1.44 Install-Package ZXing.Net.Mobile.Forms -Version 2.1.44