Compiler warns about mismatch in processor architecture, while corflags claims otherwise

StackOverflow https://stackoverflow.com/questions/23577926

  •  19-07-2023
  •  | 
  •  

Вопрос

The compiler gives the following warning:

warning MSB3270: There was a mismatch between the processor architecture of the project being built "MSIL" and the processor architecture of the reference "NationalInstruments.DAQmx", "x86".

When I check the DLL(s) that I use from national intruments, I see that each and every one of them are built against any cpu architecture.

corflags NationalInstruments.DAQmx.dll

Microsoft (R) .NET Framework CorFlags Conversion Tool. Version 4.0.30319.1 Copyright (c) Microsoft Corporation. All rights reserved.

Version : v4.0.30319 CLR Header: 2.5 ** PE : PE32 ** CorFlags : 24 ILONLY : 0 ** 32BIT : 0 ** Signed : 1

As I understood PE32 + 32BIT 0 == Any Cpu.

Any advise on how to wrap my head around this would be great

Это было полезно?

Решение

Any CPU is equivalent to PE = PE32, 32Bit = 0, AND ILOnly = 1. Since ILOnly = 0, the assembly contains unmanaged code and cannot be Any CPU. This blog entry has some interesting further reading on the corflags output.

Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top