tmyroadctfig / twaindotnet

MIT License
180 stars 117 forks source link

Error: Could not load file or assembly #32

Open rearintok opened 8 years ago

rearintok commented 8 years ago

Hi, I'm getting this error

An error occurred creating the form. See Inner.Exception for details. Th error is: Could not load file or assembly 'TwainDotnet, Version=1.0.0.0, Culture=neutral, PublicKeyToken=d3cd6e1539fa8c71' or one of its dependencies. An attempt was made to load a program with an incorrect format.

its a new project, not the sample..my project is set to .Net Framework 4, platform to AnyCPU...when i try to change the platform target to AnyCPU of TwainDotNet & TwainDotNet.WinFroms..the above exception is gone, but there will be another error on the DataSourceManager BadImageFormatException on TwainDotnet

rearintok commented 8 years ago

does not support x64

jeske commented 7 years ago

The underlying TWAIN libraries are supplied in 32bit native DLLs only, TwainDotNet needs to run in 32bit mode in order to access them. Set your project to x86 to use TwainDotNet.