Which Monogame File do you use to Distribute?

You need to make sure DirectX redistribuable is on the machine.
You may need to include FreeImage.dll too

What does that produce? Can you try running your game on the other computer without using InnoSetup?

I don’t have the FreeImage.dll file in my installation executable right now. Where would I find that file?

I think freeimage is only needed for the content pipeline, not for the game itself.

So I don’t need to distribute freeimage.dll once I’ve finished my game?

Windows crash dialog doesn’t give you any info? can you paste a screenshot with the “details” tab expanded?

There was no “Details” tab…


I believe you are correct and DirectX may be the issue. I’ll try to add the distributable for it and get back to you guys when I’ve finished.

You need to log the exception yourself then.
Add a try/catch in your Main() function, and write the exception to a file.

I installed DirectX on the virtual machine and made the program show a textbox if it catches an error. Here’s the error:

“imgnotfound” is the name of one of the image assets in my game. It is the first to be loaded and is used to replace any image files that failed to load correctly. Does anyone know how to fix this? I looked online and had trouble finding anything that seemed to work for my situation.

The .xnb files are missing in the Content folder

1 Like

I found them all right here? I found somewhere that you need to add all the xnb files to the solution in Visual Studio. Is this what you mean?

I couldn’t find in Monogame sources where an exception with this message is thrown,
can you use exception.ToString(), save the string a file, and post here?

have a look at this stackoverflow answer: https://stackoverflow.com/a/25495104

@DanielG Make sure the location of your content relative to your game executable is correct (i.e. the same as in your bin folder). The publishing tool you’re using might mess that up.

Here’s the file with the error message, the exception.ToString(), and I also added the Stack trace and the target

Ok, now if you read this message, you’ll see a DirectoryNotFoundException and it doesn’t find the Content folder.

And now I’m getting tired of debugging others people stuff :stuck_out_tongue:

2 Likes

Okay, I’m taking a look at it now. Thank you for all the help you’ve given me. Sorry that I’m kind of a pain in the neck.:joy:

1 Like

Thanks to everyone who assisted me with this issue. I figured out the problem and now have a working installer.
The problem was that when you add a folder to Inno Setup, it adds the files but doesn’t put them in that folder; it puts them with the executable. This means that the content files were in the same directory as the executable, not in a content folder. To change this, I simply had to add the directory to the Content folder destination path in the Inno Setup code file.
I think I might try to make a tutorial on making a Monogame installer with Inno Setup to help anyone else who runs into the same issues as I did.

Thank you to everyone who helped, and hopefully this will help anyone else out there with any issues!

2 Likes

a tutorial would be great mate!

please know that your efforts are appreaciated though sir

1 Like