1

我已经将一段完美运行的 MDX 代码带到了 Windows 2008R2(安装了所有 DX 驱动程序),并且得到了以下相当奇怪的错误。知道这可能意味着什么吗?

System.BadImageFormatException: Could not load file or assembly 'Microsoft.DirectX.Direct3D.dll' or one of its dependencies.  is not a valid Win32 application. (Exception from HRESULT: 0x800700C1)
File name: 'Microsoft.DirectX.Direct3D.dll'
   at Nesteruk.MdxConsole.Console..ctor(Boolean fullScreen, Int32 charWidth, Int32 charHeight, Int32 windowWidth, Int32 windowHeight)
   at Nesteruk.MdxConsole.Console..ctor(Viewport viewport) in c:\Users\Dmitri.EUPHORIA\Projects\Open-Source\MdxConsole\MdxConsole\Console.cs:line 67
   at Nesteruk.MdxConsole.Console.NewConsole(Int32 width, Int32 height) in c:\Users\Dmitri.EUPHORIA\Projects\Open-Source\MdxConsole\MdxConsole\Console.cs:line 471
   at MdxConsoleDemo.Program.Everything() in c:\Users\Dmitri.EUPHORIA\Projects\Open-Source\MdxConsole\MdxConsoleDemo\Program.cs:line 51
   at MdxConsoleDemo.Program.Main() in c:\Users\Dmitri.EUPHORIA\Projects\Open-Source\MdxConsole\MdxConsoleDemo\Program.cs:line 30
4

2 回答 2

5

你的操作系统是 64 位的吗?如果是,请在 Project Properties -> Build 选项卡中将 Platform Target 设置为 x86。MDX 仅为 32 位,试图将其加载到 64 位进程会导致BadImageFormatException.

于 2010-06-04T18:59:10.153 回答
1

没有更多信息...

1) 找到 Microsoft.DirectX.Direct3D.dll
2) 尝试使用 Reflector 打开它
3) 它是托管程序集(它加载)还是不是(不加载)?

于 2010-06-04T18:58:50.227 回答