通过ClickOnce在64位计算机上运行扫描应用程序 [英] Running a scanning app on a 64-bit machine via ClickOnce

查看:111
本文介绍了通过ClickOnce在64位计算机上运行扫描应用程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

好的,这是我的设置.

我有一个c#应用程序,可以在所有32位Windows XP-Vista-7计算机上完美运行.我已经有一个Verisign PFX支持ClickOnce部署,并且正在使用Atalasoft DotTwain 8.0作为第三方扫描程序帮助程序.

I have a c# app working perfectly on all 32-bit Windows XP-Vista-7 machine. I already have a verisign PFX to support the ClickOnce deployment and is using Atalasoft DotTwain 8.0 as the 3rd party scanner helper.

发布应用程序时,我选择任何CPU"作为平台目标.当我尝试使其在Windows 7 64位Home Premium上运行时,安装后我的应用程序崩溃.

When I publish my application, I choose "Any CPU" as the Platform target. When I try to make it run on a Windows 7 64-bit Home Premium, my application crashes after the installation.

我尝试在特定的x64平台上重新发布该作品,但仍然失败.

I tried re-publishing the work on a specific x64 platform but still failed.

关于我在这里做错什么的任何想法?非常感谢〜!

Any ideas on what i'm doing wrong here? thanks so much~!

推荐答案

选择'x86',我敢打赌它会起作用;

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

您很可能在您的项目中有一个"x86"(32位)引用,例如DotTwain. 任何CPU"表示.NET框架会将其作为"x64"运行,因为您已经告诉它一切正常.然后,它尝试加载引用,找到它的32位并给出"BadImageFormatException"(通常).

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

因此,您需要的不是DotTwain版本,也不是"ngen-ed"版本,CPU引用也为"Any",或者发布一个单独的64位版本,其中肯定没有设置所有引用到"x86"(您想要任意"或"x64").

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

(一直遇到此问题;那里有几个可以在32位,64位上运行并使用DotTwain和其他Atalasoft组件的应用程序)

(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)

希望有帮助!

这篇关于通过ClickOnce在64位计算机上运行扫描应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆