C # – Run the scan application on a 64-bit computer via ClickOnce

Okay, here are my settings.

I have a c#app that works on all 32-bit Windows XP-Vista-7 machines Normal operation. I already have a verisign PFX to support ClickOnce deployment and use Atalasoft DotTwain 8.0 as a third-party scanner helper.

When I publish my application, I choose “Any CPU” as Platform target. When I try to run on Windows 7 64-bit Home Premium, my application crashes after installation.

I tried to republish the work on a specific x64 platform, but it still fails Anymore.

Any thoughts on what I am doing wrong here? thank you very much~!

choose’x86′, I bet it will work;

You most likely have an’x86′ (32-bit) reference in your project, such as DotTwain. “Any CPU” means that the .NET framework runs it as “x64” because you have told it that everything is ok. Then it Try to load a reference, find its 32-bit and give a’BadImageFormatException’ (usually).

So, you need a version of DotTwain that is not’ngen-ed’ and also has a CPU reference of’Any’ , Or release a separate 64-bit version, all your references are definitely not set to’x86′ (you want’any’ or’x64′).

(I have been encountering this problem; there is Several applications run in 32-bit, 64-bit, and use DotTwain and other Atalasoft components)

Hope it helps!

Ok, here are my settings.

I have a c#app on all 32-bit Windows XP-Vista-7 It can run normally on the machine. I already have a verisign PFX to support ClickOnce deployment, and use Atalasoft DotTwain 8.0 as a third-party scanner helper.

When I publish my application, I choose ” Any CPU” as the platform target. When I try to run on Windows 7 64-bit Home Premium, my application crashes after installation.

I try to republish the work on a specific x64 platform , But still failed.

Any thoughts on what I am doing wrong here? thank you very much~!

Choose’x86′, I bet it will work;

You probably have one in the project’ x86′ (32-bit) references, such as DotTwain. “Any CPU” means that the .NET framework runs it as “x64” because you have told it everything is ok. Then it tries to load a reference, finds its 32-bit and gives Issue a’BadImageFormatException’ (usually).

So, you need a version of DotTwain that is not’ngen-ed’, and a CPU reference of’Any’, or release a separate 64-bit version, your All references are definitely not set to’x86′ (you want’any’ or’x64′).

(I have been encountering this problem; there are several applications running in 32-bit and 64-bit, And use DotTwain and other Atalasoft components)

Hope it helps!

Leave a Comment

Your email address will not be published.