Instead, MonoGame keeps track of your content on its own - only you and MonoGame need to know where the files are. In conclusion, it’s not Visual Studio building your content - so your content won’t show in Visual Studio as part of your solution. Usually I tend to build my stuff in the Pipeline GUI and get the actual error details when working with HLSL shaders.
That’s why Visual Studio doesn’t show your other content files - it doesn’t need to know they’re there.īut that’s also why you get some vague compiler errors in Visual Studio when MonoGame fails to process all your content. xnb files, and copy them over to the right spot in your game’s output.
The MonoGame Pipeline Tool for your project will open. In the File Explorer window that opens, double click Content.mgcb. MonoGame will then look at all the paths in that file, process everything into. To access the Pipeline Tool, right click on the Content folder in your Solution Explorer and select Open Folder in File Explorer. So all your Visual Studio project needs to do is say “OK, MonoGame, this is a Content.mgcb file. mgcb file contains a list of file paths to various content files in your game, and how they should be imported and processed. Only the Content.mgcb file needs to actually be in the Solution Explorer with the relevant build action. Probably a really late reply, but…the reason the graphics folder doesn’t show up in your Solution Explorer in Visual Studio is because…it simply doesn’t need to be directly used by your solution. The graphics folder does not show up in the solution explorer pane but it builds without errors and the sprites are drawn.
HOW TO USE MONOGAME VISUAL STUDIO FREE
To free up the RAM taken by your loaded texture. Then, for good practice, in UnloadContent: myTexture.Dispose() You must also omit the file extension of the PNG file in the asset path - so, it’s “smile”, not “smile.png”. If you added a PNG file named “smile” to the “graphics” folder, the asset path is “graphics/smile”. Note: Replace “graphics/myTexture” with the asset path to the PNG image you added in Content Pipeline. In LoadContent(), add myTextureVariable = Content.Load("graphics/myTexture") Then, in Visual Studio, in your game class, add a Texture2D variable to store the texture in. Then, click “File > Save” in the Content Pipeline. Find the PNG texture you’d like to add and open it. Right-click the new folder, click “Add > Existing Item”. Name it “graphics” or whatever you desire. Right-click in the treeview to the left, click “Add > New Folder”. This will pop open the MG pipeline tool GUI.