0

我在 .NET Frame Work 4.0 上使用 C# 创建了一个项目,并且我使用了 WIA(Windows 图像采集)并且它工作成功。
当我在另一台 PC 上运行 .exe 文件时,我收到一条消息:

System.BadImageFormatException 未处理 Message=Could not load file or assembly 'Interop.WIA, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' 或其依赖项之一。

甚至我已经在那台 PC 上成功安装了 WIA.dll。

*注意: *我已经在 windows 7 上创建了项目,并且 .exe 尝试在 windows XP 上运行,其他功能运行良好。

4

1 回答 1

0

当您没有在 IIS 中为应用程序池启用 32 位应用程序时,通常会发生这种情况

要将 IIS 配置为运行 32 位应用程序,您必须执行以下步骤:

Open IIS.
Go to the current server – > Application Pools.
Select the application pool your 32-bit application will run under.
Click the Advanced setting or Application Pool Default.
Set Enable 32-bit Applications to True.

希望能帮助到你

于 2020-06-24T06:57:59.023 回答