Running a scanning app on a 64-bit machine via ClickOnce

◇◆丶佛笑我妖孽 提交于 2019-12-05 23:21:36

Choose 'x86' and I'll bet it will work;

You most likely have an 'x86' (32-bit) reference in your project, for example DotTwain. 'Any CPU' means that the .NET framework will run it as 'x64' because you've told it anything is OK. Then it tries to load a reference, finds it's 32-bit and gives a 'BadImageFormatException' (usually).

And so, you'd need a version of DotTwain that's not been 'ngen-ed', has a CPU reference of 'Any' too, or release a separate 64-bit version where all of your references are definitely not set to 'x86' (you'd want 'any' or 'x64').

(Experience this problem all the time; have several apps out there that run on 32-bit, 64-bit, and use DotTwain and other Atalasoft components)

Hope that helps!

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!