Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

c# - System.BadImageFormatException - mismatch between versions

I am getting the following

System.BadImageFormatException: 'Could not load file or assembly 'Flir.Atlas.Live, Version=2.0.14266.1000, Culture=neutral, PublicKeyToken=caa391fd8e07c76b' or one of its dependencies. An attempt was made to load a program with an incorrect format.'

I do have Flir.Atlas.Live referenced and the Version shows incorrectly as "2.0.14266.1000" in the reference properties.

enter image description here

When I go to the actual file I referenced at the path the version of that file is "6.0.18050.1001". When I check the dll file that is actually being copied to the bin/debug folder it is also version "6.0.18050.1001".

It is like there is a requirement somewhere that specifies version "2.0.14266.1000". I cannot find that version number anywhere in my solution when I search for it. If I delete Flir.Atlas.Live" as a reference and readd it I get the same result.

What could be causing the version mismatch?

EDIT - This is 64 bit. It was 32bit, I am compiling for 64 bit only.

EDIT 2 - .csproj file has old version requirements:

<Reference Include="Flir.Atlas.Image, Version=2.0.14266.1000, Culture=neutral, PublicKeyToken=caa391fd8e07c76b, processorArchitecture=AMD64">
  <SpecificVersion>False</SpecificVersion>
  <HintPath>............Program Files (x86)FLIR SystemsFLIR Atlas SDK 6inx64Flir.Atlas.Image.dll</HintPath>
</Reference>

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...