0

I create a brand new file in visual studios, MonoGame Windows Project. Then I run it and I get an instant error. What is the problem? Error states: An unhandled exception of type 'System.DllNotFoundException' occurred in SharpDX.XInput.dll

Additional information: Unable to load DLL 'xinput1_3.dll': The specified module could not be found. (Exception from HRESULT: 0x8007007E)

     if (GamePad.GetState(PlayerIndex.One).Buttons.Back == ButtonState.Pressed || Keyboard.GetState().IsKeyDown(Keys.Escape))
          //this is what is causing the error
nameishi
  • 43
  • 1
  • 8
  • are you familiar with how to add `using` to the .cs class file header.. also are you manually adding the references to the `References` node in the project. can you show what your using section in the header looks like..? – MethodMan Feb 29 '16 at 16:38
  • It seems you're lacking some DirectX libraries, have you installed the latests DirectX runtimes? – Gusman Feb 29 '16 at 16:52
  • http://community.monogame.net/t/unable-to-load-dll-xinput1-3-dll-on-windows-8-1/2118 – Gusman Feb 29 '16 at 16:53
  • I am not manually adding anything, the only thing I did was create a new file. If you run it, a empty window should pop up. But I get an error. I wasnt sure if there was a plugin I was missing and No I have not installed DirectX..I will do that now – nameishi Feb 29 '16 at 17:26
  • You are missing the DirectX SDK, this is a common error. – vgru Mar 02 '16 at 11:52
  • Thanks that was the Issue – nameishi Mar 02 '16 at 17:40
  • @Groo if you put this as the answer I would have given you credit. And someone gave me a downgrade. So Im trying to fix my downgrades so that I can ask a question. – nameishi Jun 24 '18 at 13:00
  • @nameishi: you can accept Neill's answer below, that's basically the same solution. – vgru Jun 30 '18 at 09:09
  • @Groo so why the downgrade? – nameishi Jul 01 '18 at 14:35
  • @nameishi: hi, no, I didn't downvote this, I don't think your question is "unclear and not useful". – vgru Jul 03 '18 at 06:49

2 Answers2

1

I managed to get around this issue by downloading and installing the DirectX End-User Runtimes (June 2010) from this link: https://download.microsoft.com/download/8/4/A/84A35BF1-DAFE-4AE8-82AF-AD2AE20B6B14/directx_Jun2010_redist.exe

Neill
  • 26
  • 4
0

Adding DirectXEnd plug in solved the problem. Thanks

nameishi
  • 43
  • 1
  • 8