bloxlab / BarcodeScannerWP8

Cordova plugin to enable barcode scanning on Windows Phone 8
6 stars 5 forks source link

CS0246 error: Type namespace ZXing could not be found. #2

Open slarribeau opened 10 years ago

slarribeau commented 10 years ago

Just used BarcodeScannerWP8 with Cordova. It went well and I'm happy with the way it works. I had a small hiccup during installation and have a suggestion for the README.md file:

After I ran the command:

"cordova plugin add org.bloxlab.barcodescanner"

I saw that I was getting ZXing namespace errors during build process in both cordova CLI and Visual Studio.

I then realized that the compiler/linker wasn't able to find zxing.wp8.0.dll

I could see the dll in the following directories: platforms\wp8\Plugins\org.bloxlab.barcodescanner plugins\org.bloxlab\barcodescanner\src\wp8\dependencies.

I then attempted to "add" it to the References directory in Visual Studio, but Visual Studio complained with the message below: "A reference to a higher version or incompatible assembly cannot be added to the project" (I am using Visual Studio 11.0.61030.00 Update 4)

I did some googling and found out about another WP8 barcode project that recommended using nuGet to pull in XZing.Net. I tried that and and it solved my problem.

Not sure if this is an issue related to my environment, of if 'cordova plugin add' failed to put the dll in proper place, but thought I would share my sequence as well as proposed work-around.

Scott Larribeau

bloxlab commented 10 years ago

Hi Scot, appreciate your feedback - thanks. Please could you tell me which version of cordova you are using? I'll see if I can replicate the issue under the same or close to the same environment/setup. Si

slarribeau commented 10 years ago

No prob:

SYS0385-SL-2:~ macuser$ cordova -v 3.4.1-0.1.0

Scott

On Mon, May 19, 2014 at 3:44 PM, Simon Chan notifications@github.comwrote:

Hi Scot, appreciate your feedback - thanks. Please could you tell me which version of cordova you are using? I'll see if I can replicate the issue under the same or close to the same environment/setup. Si

— Reply to this email directly or view it on GitHubhttps://github.com/bloxlab/BarcodeScannerWP8/pull/2#issuecomment-43567707 .

Danielmat commented 9 years ago

Good afternoon friends, you guys managed to solve this problem? I also can not compile.

bloxlab commented 9 years ago

A workaround is to open your solution in Visual Studio and reference the zxing.wp8.0.dll located in platforms\wp8\Plugins\org.bloxlab.barcodescanner. Rebuild the solution in Visual Studio. Any subsequent cordova build commands should be successful.