C # tesnet2 смешанный режим «Не удалось найти информацию о схеме для атрибута« useLegacyV2RuntimeActivationPolicy ».» - PullRequest
1 голос
/ 13 июля 2011

Я получаю:

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'.

, когда я пытаюсь скомпилировать

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.Height))[0];
    richTextBox1.AppendText(result.ToString());
}

я загрузил tessnet2_32.dll (оболочку Tesseract .NET (v 2.04.0)), загруженную с 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>

кто-нибудь знает, что может вызвать это?

...