SharpDX Error on Start up [RESOLVED]

Hi guys,

I was optimising and cleaning up some old code from my game and I thought I’d run the code analyzer on it just to see what it found. I wish I hadn’t - A few hours later and I still can’t get my project to run anymore. Reverting all the code changes hasn’t fixed it either so I’m guessing It’s changed some config somewhere that’s hidden away?

The error occurs literally as the game starts up (It doesn’t get as far as Initialize or LoadContent):

{“Could not load type ‘SharpDX.XAudio2.DeviceDetails’ from assembly ‘SharpDX.XAudio2, Version=, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1’.”:“SharpDX.XAudio2.DeviceDetails”}

||StackTrace|" at Microsoft.Xna.Framework.Audio.SoundEffect.InitializeSoundEffect()\r\n at Microsoft.Xna.Framework.FrameworkDispatcher.Update()\r\n at RoF.Game…ctor() in D:\Projects\MonoGame\Game.cs:line 450\r\n at Main() in \Program.cs:line 17

I’m not actually even using any sound at this point, I am however still using MG 3.6.

It was all working perfectly until this point. Any ideas?


Have you tried removing and re-adding MG?

Hmm well restoring my whole solution from a backup a few days ago fixed it at least, so it didn’t shaft VS 2019 anyway.

I’ll stick to cleaning up and optimizing manually I think :slight_smile: