通过 ClickOnce 在 64 位计算机上运行扫描应用程序

发布于 2024-09-10 21:51:35 字数 309 浏览 0 评论 0原文

好的,这是我的设置。

我的 ac# 应用程序可以在所有 32 位 Windows XP-Vista-7 计算机上完美运行。我已经有一个威瑞信 PFX 来支持 ClickOnce 部署,并使用 Atalasoft DotTwain 8.0 作为第 3 方扫描仪助手。

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

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

关于我在这里做错了什么有什么想法吗?非常感谢~!

Okay, here's my setup.

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.

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.

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~!

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

零崎曲识 2024-09-17 21:51:35

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

您的项目中很可能有“x86”(32 位)引用,例如 DotTwain。 “任何 CPU”意味着 .NET 框架会将其作为“x64”运行,因为您已经告诉它一切都可以。然后它尝试加载一个引用,发现它是 32 位的并给出“BadImageFormatException”(通常)。

因此,您需要一个未经过“ngen-ed”的 DotTwain 版本,CPU 引用也为“Any”,或者发布一个单独的 64 位版本,其中所有引用绝对不会设置为“x86” ”(您需要“任何”或“x64”)。

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

希望有所帮助!

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!

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文