【问题标题】:Plug-in for Monogame on Visual StudiosVisual Studios 上的 Monogame 插件
【发布时间】:2016-06-12 19:07:24
【问题描述】:

我在 Visual Studio 中创建了一个全新的文件 MonoGame Windows Project。然后我运行它,我得到一个即时错误。问题是什么?错误状态: SharpDX.XInput.dll 中出现“System.DllNotFoundException”类型的未处理异常

附加信息:无法加载 DLL 'xinput1_3.dll':找不到指定的模块。 (HRESULT 异常:0x8007007E)

     if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
          //this is what is causing the error

【问题讨论】:

  • 您是否熟悉如何将using 添加到.cs 类文件头中。您是否手动添加对项目中References 节点的引用。你能在标题中显示你使用部分的样子吗?
  • 您似乎缺少一些 DirectX 库,您是否安装了最新的 DirectX 运行时?
  • 我没有手动添加任何东西,我唯一做的就是创建一个新文件。如果你运行它,应该会弹出一个空窗口。但我得到一个错误。我不确定是否有我丢失的插件,不,我还没有安装 DirectX..我现在会这样做
  • 您缺少 DirectX SDK,这是一个常见错误。

标签: c# monogame visual-studio-setup


【解决方案1】:

我通过以下链接下载和安装 DirectX 最终用户运行时(2010 年 6 月)设法解决了这个问题:https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe

【讨论】:

    【解决方案2】:

    添加 DirectXEnd 插件解决了这个问题。谢谢

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2015-09-19
      • 1970-01-01
      • 1970-01-01
      • 2019-05-15
      • 2013-08-27
      • 1970-01-01
      相关资源
      最近更新 更多