Problems with creating installer

I’ve created a game using MonoGame. Now I want to show it someone. In order to create an installer I used ClickOnce. Publish was succeeded, but after I installed application and tried to run it I got this: “an unhandled Microsoft.net Framework exception occurred in ProjectName.exe”. But it doesn’t say wich exactly exeption and where it is. But if I run .exe file from the Debug folder - it works fine. The same on the other machine. How can I make my installer work properly?
I’m using VS 2015 with Windows 10
I’d appreciate any help.

You’re probably missing a dependency of a dependency. Those tend to cause vague exceptions.

Have you verified that the contents of your installer’s output folder are the same as in your Release directory? (ignoring PDBs and the like)

How can I check dependencies?
And yes, I verified contens of installer’s output folder and Release folder. I’m not sure if it’s ok, installer’s output doesn’t contain .vshost files and .xml files. The other are the same (exept .pdb file) but with .deploy appended.

Checking the folder contents is the quick and low-accuracy way. You can use ILSpy and the like to trace deps but most likely if the folders are correct it’s not going to be a dependency issue.

The second most likely case is illegal IO by ignoring UAC and the MS guidelines in your development, which doesn’t fly once you deploy.


You really should have an Unhandled exception handler set up in every single program that isn’t a console program, at the very least for the purpose of writing a log file out to AppData/Roaming/Your_Program so you can get a stacktrace and full exception tree.

Dumping that information eliminates all of this guesswork.

Edit: FYI, setting up deployment and installers always sucks.

Thanks a lot for your help. Finally I managed to figure out this problem. It urns out I just forgot to check my text files as Content in Properties.

That’ll do it. I forgot about the whole resource/embedded-resource/content debacle.