在某些计算机上,x64程序集以32位进程启动,这怎么可能,是否可以以某种方式再现?某些应用程序能以这种方式启动我的程序吗?我无法在本地重现,这是通过电子邮件收到的日志文件。
日志文件:
Environment.Is64BitProcess: False
Environment.CommandLine: "****Bin64\MyExe.exe"
Environment.OSVersion: Microsoft Windows NT 6.1.7601 Service Pack 1
IntPtr.Size: 4
Is64BitOperatingSystem: True
Default Culture: de-DE
Default UI Culture: de-DE
Exception occured: System.Reflection.TargetInvocationException:
Exception has been thrown by the target of an invocation. --->
System.BadImageFormatException: Could not load file or assembly 'MyAssembly, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its dependencies.
An attempt was made to load a program with an incorrect format.
MyAssembly是C ++ / CLI程序集,本机代码编译为x64
MyExe.exe是.NET程序集构建为x64
抛出异常是因为尝试将带有本机代码的x64程序集加载到x86进程中。