Please dont mark -ve it is basic. Hi, In my visual studio2012 I am using tessnet2 library for ocr but unable to compile the code. I have seen http://www.pixel-technology.com/freeware/tessnet2/ and have made all settings. I placed the tessdata folder in my .exe directory also. I have Microsoft visual c++ 2008 redistributable packages also (both x86 and x64) installed. My system is 64bit. I have also tried only using x64 package by deleting x86. I am using .net4.5 in my setting. I also tried other framework in my project settings. I have also tried x86orx64 or both in my project settings. I have this code
Bitmap image = new Bitmap("C:\\Users\\Amna\\Documents\\text.tif");
tessnet2.Tesseract ocr = new tessnet2.Tesseract();
ocr.SetVariable("tessedit_char_whitelist", "0123456789"); // If digit only
ocr.Init(@"c:\temp", "fra", false); // To use correct tessdata
List<tessnet2.Word> result = ocr.DoOCR(image, Rectangle.Empty);
foreach (tessnet2.Word word in result)
Console.WriteLine("{0} : {1}", word.Confidence, word.Text);
but I get this error: Could not load file or assembly 'tessnet2_64, Version=2.0.4.0, Culture=neutral, PublicKeyToken=1550524b5ba07e29' or one of its dependencies. The system cannot find the file specified. I have seen these links as well Tessnet2 error in C# IIS 7.5 Fixing An attempt was made to load a program with an incorrect format problem? and many more.