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

Invalid Token Error when Compiling for .Net 3.5

Apr 10, 2013 at 11:26 AM

I have an Issue when I try to compile the ZXing Code with Visual Studio 2008 for .Net 3.5.
I use this environment cause it is recommented by some other components I use.
During the compilation in the file ibarcoderenderer.cs I get the Error:

Error 1 Invalid token 'out' in class, struct, or interface member declaration C:\Download\ZXing_Net\lib\renderer\IBarcodeRenderer.cs 27 38 zxing.net3.5

the line is nr. 27 : public interface IBarcodeRenderer<out TOutput>

The problem seams to be the "out" attribute.
I'm unsure is an update to a newer development environment would fix the problem.

Regards Hacki
Apr 10, 2013 at 7:56 PM
Two options:
  • use Visual Studio 2010 or newer
  • define a new macro in the project settings (VS2008 for example)
    extend the following line in the file IBarcodeRenderer.cs from

if !(WINDOWS_PHONE || WindowsCE)


if !(WINDOWS_PHONE || WindowsCE || VS2008)

repeat that step for all incompatible places which the compilere reports.