How to run tessnet2 in .net C#

3,203 views
Skip to first unread message

tesseractNewUser

unread,
Feb 20, 2012, 6:21:22 AM2/20/12
to tesseract-ocr
To,

I have the problem when running in visual studio 2008. It generate the
following error

Could not load file or assembly 'tessnet2_32, Version=2.0.4.0,
Culture=neutral, PublicKeyToken=1550524b5ba07e29' or one of its
dependencies. An attempt was made to load a program with an incorrect
format.

I follow the step to add reference and language data in my project.
1) Download binary here, add a reference of the assembly Tessnet2.dll
to your .NET project.
2) Download language data definition file here and put it in tessdata
directory. Tessdata directory and your exe must be in the same
directory.
3) Look at the Program.cs sample

Base on the reference site
http://www.pixel-technology.com/freeware/tessnet2/


Any idea how to resolve the problem Thanks

From louisth

Sriranga(78yrsold)

unread,
Feb 20, 2012, 6:53:13 AM2/20/12
to tesser...@googlegroups.com
please visit http://vietocr.sf.net/  - may help you.
-sriranga(79yrs)


--
You received this message because you are subscribed to the Google
Groups "tesseract-ocr" group.
To post to this group, send email to tesser...@googlegroups.com
To unsubscribe from this group, send email to
tesseract-oc...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/tesseract-ocr?hl=en

maylor...@gmail.com

unread,
Aug 7, 2013, 5:25:39 PM8/7/13
to tesser...@googlegroups.com
Check the "Platform Target" that your code is built to run on.
 
You should have 3 options,
1) Any CPU
2) x86
3) x64
 
Change this option depending on your system.
 
x86 worked for me when I had this problem

Mohammad Mojaddady

unread,
Oct 18, 2013, 5:12:56 AM10/18/13
to tesser...@googlegroups.com, maylor...@gmail.com
I receive same error( on Any CPU and 64 in Platform Target):
Could not load file or assembly 'tessnet2_32, Version=2.0.4.0, Culture=neutral, PublicKeyToken=1550524b5ba07e29' or one of its dependencies. An attempt was made to load a program with an incorrect format.

by changing to 86, I receive this error:
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.

what`s the solution?
( my OS is win8 and VS2012)
Regard

Mohammad Mojaddady

unread,
Oct 18, 2013, 7:16:55 AM10/18/13
to tesser...@googlegroups.com
By This Configuration; I received error(all Config is 64 bit):
Mixed mode assembly is built against version 'v2.0.50727' of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.










Reply all
Reply to author
Forward
0 new messages