![](/img/trans.png)
[英]System.BadImageFormatException when use C# call C++
[英]System.BadImageFormatException when running C# program
我正在Windows 7上的VS 2010上編譯C#程序,然后在另一台32位計算機上運行文件(所有文件均來自內部版本的bin \\ Debug目錄)。
調試目錄中的文件還包含此程序依賴的Microsoft.Office.Project.Server.Library.dll文件。
在VS 2010項目的生成配置中,平台設置為x86。 但是在32位計算機上,它會導致System.BadImageFormatException。
Unhandled Exception: System.BadImageFormatException: Could not load file or assembly
'Microsoft.Office.Project.Server.Library, Version=12.0.0.0, Culture=neutral,
PublicKeyToken=71e9bce111e9429c' or one of its dependencies. The module was expected to
contain an assembly manifest. File name: 'Microsoft.Office.Project.Server.Library,
Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'
這可能是什么原因?
我仍然認為這是x86 v x64問題。 可執行文件是否依賴於其他x64庫?
可能是問題機器的.NET框架與構建機器的版本不相同。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.