Click-Once Doesn't Creater a Content Folder

Hello everyone,

I am new to Monogame.
I created a test project and a new content project according to this tutorial: http://rbwhitaker.wikidot.com/monogame-managing-content .
I published the game (to show off to a friend of mine) with click-once. But when I try to open it, I immediately get an exception in the LoadContent() function. And I then noticed that click-once doesn’t even create the Content folder.
When I debug the project the Content folder is created and everything is working.

This is how my project looks like:

Can someone help me understand what i might be doing wrong? Is one-click the right way to publish my game?

I’m having the same problem. I set up my content project using the same tutorial as the OP and have tried a number of different suggestions found around the web. Still no dice. Does anyone have a solution for publishing Monogame games?

In the end I solved this problem by manually creating the .xnb files (using XNA Formatter) and putting them in the project content folder.
I am not sure if it is necessary, but I also set the ‘Build Action’ to ‘Content’ and the the ‘Copy to Output Directory’ to ‘Copy Always’.

For reference, this is how my project looks like now (the .png files are not really needed):

I hope this will help you.

Edit:
See Shiro post below. He explains how it all works.

you don’t need to convert png’s into xnb, only 3d models and fonts. what do you mean by “I published the game” and “click-once” ? i don’t quite understand what you are asking. you are trying to run your finished windows game from another computer ? in that case here are the requirements of monogame for all platforms
http://gamedev.stackexchange.com/questions/61872/monogame-minimum-hardware-requirements

Also http://rbwhitaker.wikidot.com/monogame-managing-content instructions are incomplete. you need to right click your content folder in your main project and add existing item for every .xnb file you got from the .fbx (3d model) or .spritefont (font) conversion add as link instead of add when you are selecting each file. so if you later on overwrite your .spritefont or .fbx file and debug, your main project content files will automatically update. another method is what you did, single handily copy paste every .xnb you got from compiling the “content project”.

2 Likes

Click-Once is the default way to publish a .net application is Visual Studio.
And when I say publish I mean: Creating an install file for my game so other people will be able to install my game on their computer.

And thank you for your explanation about .xnb files. I finally understand how it works :smile:

http://gamedev.stackexchange.com/questions/61872/monogame-minimum-hardware-requirements you can see that the requirements for monogame directX are just directX and .net framework 4.0/4.5 which is already installed in windows

This has been super helpful guys! Thanks!
I’ve finally got the project publishing with content. Doing Add Existing Item -> Add As Link actually didn’t work for me, but manually copying the .xnb files from my content project into the Content folder for the MonoGame project and setting Build Action to “Content” and Copy to Output Directory to “'Copy Always” worked. Perhaps I don’t have something set correctly for the link to work. It’s not a huge deal because I should only need to copy to the main Content folder when publishing so assets should be finalized then. Thanks again!