C# tesnet2 mixed-mode "Could not find schema information for the attribute 'useLegacyV2RuntimeActivationPolicy'."
I get :
Could not find schema information for the attribute 'useLegacyV2RuntimeActivationPolicy'.
Could not find schema information for the element 'supportedRuntime'.
Could not find schema information for the attribute 'version'.
Could not find schema information for the attribute 'sku'.
when I try to compile
private void button1_Click(object sender, EventArgs e)
{
Bitmap sourceImage = new Bitmap(System.Drawing.Image.FromFile("numbers.bmp", true));
Bitmap nbmp = new Bitmap(sourceImage.Width * 4, sourceImage.Height * 4);
Graphics g = Graphics.FromImage(nbmp);
g.SmoothingMode = System.Drawing.Drawing2D.SmoothingMode.HighQuality;
g.InterpolationMode = System.Drawing.Drawing2D.InterpolationMode.Bicubic;
g.DrawImage(sourceImage, 0, 0, nbmp.Width, nbmp.Height);
g.Dispose();
tessnet2.Tesseract t = new tessnet2.Tesseract();
t.SetVariable("tessedit_char_whitelist", "0123456789");
t.Init("tessdata", "eng", true);
tessnet2.Word result = t.DoOCR(nbmp, new Rectangle(0, 0, nbmp.Width, nbmp.Heigh开发者_C百科t))[0];
richTextBox1.AppendText(result.ToString());
}
i loaded tessnet2_32.dll (Tesseract .NET wrapper (v 2.04.0)) doenloaded from http://www.pixel-technology.com/freeware/tessnet2/
my app.conf
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<startup useLegacyV2RuntimeActivationPolicy="true">
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
</startup>
</configuration>
anyone know what could cause this ?
精彩评论