Search code examples
c#monogamevisual-studio-setup

Plug-in for Monogame on Visual Studios


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

Solution

  • 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