locked
Not able to install ZXing.Net to my apache cordova app.

    Question

  • Hi

    I am new to apache cordova or WP app development for that mater. I am having a empty apache cordova app and trying to install XZing.net for barcode scanning functionality.

    When i am using  PM> Install-Package ZXing.Net in package manager console , i am getting following exception.

    PM> Install-Package ZXing.NetInstalling 'ZXing.Net 0.14.0.1'.Successfully installed 'ZXing.Net 0.14.0.1'.Adding 'ZXing.Net 0.14.0.1' to BarcodePOC.Uninstalling 'ZXing.Net 0.14.0.1'.Successfully uninstalled 'ZXing.Net 0.14.0.1'.Install failed. Rolling back...Install-Package : Could not install package 'ZXing.Net 0.14.0.1'. You are trying to install this package into a project that targets 'MDD,Version=v8.0', but the package does not contain any assembly references or content files that are compatible with that framework. For more information, contact the package author.At line:1 char:1+ Install-Package ZXing.Net+ ~~~~~~~~~~~~~~~~~~~~~~~~~    + CategoryInfo          : NotSpecified: (:) [Install-Package], InvalidOperationException    + FullyQualifiedErrorId : NuGetCmdletUnhandledException,NuGet.PowerShell.Commands.InstallPackageCommand PM> 

    Can somebody please help to understand what i am missing here? thanks.


    • Edited by Demetron Saturday, March 14, 2015 7:02 AM
    Saturday, March 14, 2015 6:19 AM

Answers

  • There is a WinMD version of ZXing.Net which can be used with HTML/JS based apps. There is also a sample app available in the source code repository (branch WinMD).

    The nuget problem is related to the target "MDD" which isn't included in the package. I'm not sure how to fix that. But perhaps it would be a workaround to download the binaries from the ZXing.Net project homepage and add the reference manually.

    Monday, March 16, 2015 9:41 PM

All replies

  • From the name, ZXing.Net is a .Net library. It can only be used in .Net projects.

    Windows Store apps in HTML/JavaScript, including Cordova, do not use .Net and cannot directly call .Net libraries.

    You can create a Windows Runtime Component in C# or VB which hosts ZXing.Net and exposes it to your HTML/JavaScript project.

    Monday, March 16, 2015 5:06 AM
    Owner
  • There is a WinMD version of ZXing.Net which can be used with HTML/JS based apps. There is also a sample app available in the source code repository (branch WinMD).

    The nuget problem is related to the target "MDD" which isn't included in the package. I'm not sure how to fix that. But perhaps it would be a workaround to download the binaries from the ZXing.Net project homepage and add the reference manually.

    Monday, March 16, 2015 9:41 PM
  • Thanks for the update, Michael!
    Monday, March 16, 2015 10:06 PM
    Owner