Troubleshooting this TutorialSometimes, even though you try hard to understand the information in a tutorial, things don't work out quite like you want it to. This page is here to help you resolve any problems you might be having with the tutorial on managing content in MonoGame. The Common Mistakes section describes common problems that people have when doing the things in this tutorial, and how to resolve them. The Frequently Asked Questions section describes questions that people have that aren't related to mistakes, but rather, trying to understand the stuff better or exploring how it can be used. If your problem or concern isn't addressed here, feel free to add a comment below, so that I know where you're having trouble. I like to keep these pages fairly clean, so I may remove comments that I felt like have been addressed. If I remove your comment and you don't feel like the problem has been fixed, repost the question and we'll take another look at it. If a tutorial has a mistake in it, I will fix the mistake and reply to the comment with a brief explanation. However, after a couple of weeks I'll likely go back and remove the original comment as well as my reply, because, hopefully, the problem will have been fixed, and it won't be a concern any more. |
Common MistakesNone listed yet… |
Frequently Asked QuestionsNone listed yet… |
i like your site i recommend it to others
id like to see a mono game tutorial for taking a xna game window
choosing the proper template and makeing it run on each system
with maybe the exclusion of the uber expensive 1000 xmarin one
specifically take monogame build a window
under which template ? to allow it to run on ubuntu
what else needs to be done if anything
Well, no way to install XNA 4.0 on Windows 8.1, it fails while installing. I tryed everything.
So Oracle Virtual Box + Windows XP sp3 +VS2010 Express C# + XNA 4.0 work great, and there's no need to install VS on nature Windows.
Maybe it'll be useful for someone.
Thanks, Kotefey. That's an interesting solution. Thanks for pointing it out to people.
cannot install VS 2010 Express. Fails during install.
Hello,
I followed your tutorial named "MonoGame - Managing Content", but when I reach the step:
" 4. Select the compiled content files. These will have the extension .xnb. If you don't see the XNB files, you'll need to change the dialog to show All Files (*.*). "
I cannot find any .xnb files, only .xml files.
Hey Chackingnoob, I am currently facing the same issue. Did you have any luck with fixing it?
After adding a content project and immediately rebuilding the solution you end up with:
Error 1 The command "SETX MONOGAME_PLATFORM "PSM" > NUL" exited with code 1. xxxContent
note: it's the Content project, not the ContentContent one (;
If you add a refernce to the Content (not ContentContent) project you get an additional error without paying more for it!
xxx stands for my games name.
Error 2 Metadata file 'c:\Users\alexanders.mass\documents\visual studio 2012\Projects\xxx\xxxContent\xxxContent\bin\PSM\IgnoreMe.dll' could not be found c:\users\myuser\documents\visual studio 2012\Projects\xxx\xxx\CSC xxx
I have this same problem. Have you figured out a fix for this?
After adding a content project and immediately rebuilding the solution you end up with:
Error 1 The command "SETX MONOGAME_PLATFORM "PSM" > NUL" exited with code 1. xxxContent
note: it's the Content project, not the ContentContent one (;
ALSO
If you add a refernce to the Content (not ContentContent) project you get an additional error without paying more for it!
xxx stands for my games name.
Error 2 Metadata file 'c:\Users\alexanders.mass\documents\visual studio 2012\Projects\xxx\xxxContent\xxxContent\bin\PSM\IgnoreMe.dll' could not be found c:\users\myuser\documents\visual studio 2012\Projects\xxx\xxx\CSC xxx
I am getting these same errors too. Have you figured out a fix for this? I am stuck and can't figure out what is wrong. Everything was working before too in an older project, when I went to run it again I get these errors even though I never changed anything.
I had the same error recently - it turned out that the problem was that my windows/system32 directory wasn't in my path environment variable. The setx.exe program is in the system32 dir, I guess either the XNA or the MonoGame people assumed that everyone would have system32 in their path and they didn't need to fully qualify the call to setx…
When I try to create a content project I get the following error:
A problem was encountered creating the sub project 'FirstGameContent' The project file C:\Users\admin\AppData\Local\Temp\cgxlbxn5.c2g\Temp\FirstGameContent.csproj cannot be opened.
There is a missing project subtrype.
Subtype" '{6D335F3A-9D43-9D22-F6f17CBE596}' is unsupported by this installation.
I am running Visual Studio Express as a admin. I am using windows 8.1 also I have monogame installed but not XNA.
Visual studio creates the folder FirstGameContent and that folder does have sub folders but there is nothing in any of the sub folders.
You need XNA installed.
Thanks, I managed to fix the problem.
So I am on the Managing Content part of your tutorial and when you say : Texture2D image = Content.Load<Texture2D>("[FileNameWithoutExtension]"); Would that be in the Game1.cs file?
It doesn't have to be, but that is the typical place for doing this, at least in small games while you're learning. To be more specific, it usually goes in the LoadContent method of the Game1 class (or whatever you've renamed it to, which I usually recommend). If you put it in the constructor or in the Initialize method, it will be called too early, before the graphics device or the content manager have been correctly set up, and you'll likely get an exception being thrown.
Hi, just getting an error. I loaded an image into the content folder and it can't find it, why is that? I used the Pipeline Tool to load it in.
Microsoft.Xna.Framework.Content.ContentLoadException
HResult=0x80131500
Message=The content file was not found.
Source=MonoGame.Framework
StackTrace:
at Microsoft.Xna.Framework.Content.ContentManager.OpenStream(String assetName)
at Microsoft.Xna.Framework.Content.ContentManager.ReadAsset[T](String assetName, Action`1 recordDisposableObject)
at Microsoft.Xna.Framework.Content.ContentManager.Load[T](String assetName)
at MonoTutorial.FurnaceRoom.LoadContent() in G:\source\repos\MonoTutorial\MonoTutorial\FurnaceRoom.cs:line 44
at Microsoft.Xna.Framework.Game.Initialize()
at MonoTutorial.FurnaceRoom.Initialize() in G:\source\repos\MonoTutorial\MonoTutorial\FurnaceRoom.cs:line 31
at Microsoft.Xna.Framework.Game.DoInitialize()
at Microsoft.Xna.Framework.Game.Run(GameRunBehavior runBehavior)
at Microsoft.Xna.Framework.Game.Run()
at MonoTutorial.Program.Main() in G:\source\repos\MonoTutorial\MonoTutorial\Program.cs:line 18
Inner Exception 1:
FileNotFoundException: Could not find file 'G:\source\repos\MonoTutorial\MonoTutorial\bin\Windows\x86\Debug\Content\pine-trees-2.png.xnb'.
Post preview:
Close preview