从
http://sqlite.phxsoftware.com/对System.Data.sqlite.dll运行
CorFlags.exe会产生以下输出.
Version : v2.0.50727 CLR Header: 2.5 PE : PE32 CorFlags : 24 ILONLY : 0 32BIT : 0 Signed : 1
如您所见,未指定32BIT且PE等于PE32.根据Moving from 32-bit to 64-bit application development on .NET Framework,这意味着该组件是任何cpu.但是,使用64位应用程序中的程序集会导致错误:
System.BadImageFormatException: Could
not load file or assembly
‘System.Data.sqlite’ or one of its
dependencies. An attempt was made to
load a program with an incorrect
format. File name:
‘System.Data.sqlite’
如果CorFlags.exe报告任何cpu,为什么会发生异常?组件是否错误标记为32BIT:0?
我知道有一个64位版本也可用,我只是想知道导致错误的原因.