This project has moved and is read-only. For the latest updates, please go here.

Interoperability issue between PCL and full .NET framework versions of ZXing.Net

Oct 5, 2016 at 4:41 PM
Edited Oct 6, 2016 at 5:56 PM
I've added ZXing.Net to a PCL project via NuGet (version="" targetFramework="portable45-net45+win8") and added some helper extension methods. Then I added ZXing.Net via NuGet to a unit test project (version="" targetFramework="net461") to try to test my extension methods. There's a conflict in how the types are referenced as they're located in different assemblies. For example, I'm seeing "The type 'BitMatrix' is defined in an assembly that is not referenced. You must add a reference to assembly 'zxing.portable, Version=, Culture=neutral, PublicKeyToken=4e88037ac681fe60'" when trying to pass a parameter from my unit test project to the method defined in my PCL. The PCL library references "zxing.portable", but the full .NET framework references "zxing" and "zxing.presentation".

This set up effectively prevents interoperability between PCL projects and non-PCL projects using this library.