OpenAL System.DllNotFoundException on Windows 8.1

So my game Tiles uses MonoGame 3.6. Everything has worked great across all systems, I’ve been giving out keys to some beta testers and streamers and one person came accross this error.

They uploaded the error for me

Just for the sake of testing I asked them to move soft_oal.dll from the x64 folder in to the main folder with the .exe. This solved the problem and the game ran fine. I then instructed him to try modifying MonoGame.Framework.dll.config to add these lines to possibly force windows to look in the appropriate directories.

<dllmap dll="soft_oal.dll" os="windows" cpu="x86-64" target="./x64/soft_oal.dll" />
<dllmap dll="soft_oal.dll" os="windows" cpu="x86" target="./x86/soft_oal.dll" />

I thought that should solve it but it didn’t. Maybe that’s not the correct format for mapping in windows? I’ve never had to do it for windows so I’m not sure. Either way if it was required it would seem you guys would have included it in the default MonoGame.Framework.dll.config. Maybe an issue with windows 8.1?

.NET Framework doesn’t use the .dll.config files, those are only used under Mono. On .NET Framework DllImport should resolve to the x86 or x64 folder when it doesn’t find anything in the root folder. Not sure what could be the cause :confused:

Ah, that makes sense. Is there any way to force DllImport to look somewhere?

Also, could the fact that it says it’s using .Net Framework 4.0 have anything to do with it? I thought MonoGame 3.6 uses .Net 4.5.1

AFAIK not without changing MG source code.

Nah, that doesn’t matter.

Oh… Ok, umm. I’m not sure what to do then lol.

Would it be possible for anything else installed on the system to somehow interfere with this? I’m going to try to get my hands on a clean 8.1 myself and try it out to see what happens.

I’ve have had multiple other people play the game with no problems. And I’m not sure what all systems steam tests but it even passed the build review with no issues.

You should be able to rename openal_soft.dll (from x32 and x64 folder) to OpenAL32.dll that should do the trick.
The following code should mean that is will load the correct dll.

Are you saying to rename them in both the x32 and x64 folders to OpenAL32.dll? and to keep them in the respective x32 and x64 folders?

Also, based on that code, is it a possibility and windows 8.1 is for some reason not being detected as being Windows?

Alright, I can confirm that that renaming the dlls didn’t work. I’m just going to force it copy the dlls to the .exe directory if the system is detected to be windows 32bit or 64bit respectively. It’s something that can be automated with steam depots so that’s not a huge deal but hopefully it can be fixed in the future.

Ok, I just realized this all might be my own stupid fault for not checking for updates. Since I was done with my game I wasn’t updating MonoGame anymore (regardless of the fact I was using dev branch).

Since I identified the source of the potential problem I now see that there was an update recently that addressed said problem.

My bad :stuck_out_tongue:

Thanks both of you for the help and I appologize for the confusion.