I had a similar problem while trying to render a skybox. Mine was only a problem with .x files, but you might find some luck with this. It seems that the alpha is set to 0 on the rendering. My code inside the BasicEffect loop looked like this from XNA:
currentEffect.LightingEnabled = false;
currentEffect.PreferPerPixelLighting = false;
currentEffect.World = ...
What it looks like you're seeing is the file opening as a plain text in Visual Studio. I often open the file this way because I find it handy to be able to edit stuff outside the GUI.
As mentioned by @tandersen, if you right click the Content.mgcb file in Solution Explorer you can choose "Open With..." to get the following dialog.
If you can't see the ...
It is much simpler to only support a single format at runtime.
A lot of formats just are not suited for quickly loading in the asset it contains. For example wavefront obj is a horrible format for that.
Doing the heavy lifting of conversion just once during build means that while the player is waiting on you to start showing stuff you are not doing dumb ...
Dynamically importing and processing content at runtime is explained in the sample
WinForms Series 2: Content Loading. This is the preferred method.
You can also build an XNA Content Project file using MSBuild. this blog post explains how. You can create a temporary project file, so you don't need to modify or rebuild files in your Solution.
It is possible to just pass the Content Manager to your modules, and have them load their own textures/data. Its also tidier, as the Module is responsible for loading its own textures, and doesn't have to depend on its resources being loaded elsewhere.
I do something similar - my data objects have a string specifying a texture/model, and my rendering code ...
Since it looks like your model is loaded correctly by the pipeline, this is the most barebones solution that should work to draw it(I've just tested it). It is built with VS2015 and the most recent MonoGame DirectX template using the standard blender cube.
public class Game1 : Game
private Model model;
You need to download and install the Visual C++ Redistributable Packages for Visual Studio 2013.
These two posts on https://github.com/mono/MonoGame/issues/3556 worked for me:
Hum... the redist we need vcredist_x64.exe is only 7MB. If you download and run it from the command line:
It tells you that it has /quiet ...
MonoGame does not support that, and original XNA did not either (as XNA developer Shawn Hargreaves blogged, "you must either use the Content Pipeline, or not use the type at all"). ModelContent gets serialized to the XNB file, and the file is deserialized to a Model by the framework.
This is because a runtime dependency to the Content Pipeline assemblies ...
At this time and with that error ... you should post this as a issue on github for monogame which is probably the correct place and maybe the only place to get attention from someone capable of giving a answer to this question.
Follow the instructions on the issue submission, if possible make a simplified example ...
Well, the answer was simple and something else entirely. It dawned on me that maybe I was packing too many individual textures into a single texture; it turns out I was.
I'm not sure what the texture size limit is in this context, but I must have been exceeding it. I removed a bunch of textures that were being packed to a safe amount, and the code worked as ...
Reflecting the ContentManager.Load(assetName) method, it gives this note:
Asset name, relative to the loader root directory, and not including the .xnb extension.
Even though files has the needed copy of "SpriteFont1" in it, the ContentManager isn't looking for the file in files. It's looking for "SpriteFont1" in the ContentManager's root ...
I recommend creating a custom Content project for each unique format. I recommend this blog as a starting point: http://dylanwilson.net/creating-custom-content-importers-for-the-monogame-pipeline
Also take a look at the answer to this question: MonoGame 3.4 Content Pipeline Extension missing reference
A custom Content project will enable you to create your ...
Copy your compiled (.xnb) font file to your content. And make the same filename as .spritefont file.
If you can't compile any fonts, use third party applications compiling those files.
Spritefont files are used to explain to the compiler, how that .ttf file should be compiled. (font size, chars, etc.)
The following worked for Monogame. You can copy the .dlls to your game folder (the content folder is probably a better choice), then reference them and delete the old references, like I do below. You can take the exact same logic and apply it for Microsoft.Xna.Framework.dll, and every other Xna related .dll you are referencing. For Xna, all the .dlls are in ...
For those having the same trouble, you should add two lines in the processor:
EffectContent effectSource = new EffectContent();
effectSource.EffectCode = input.SourceCode;
//Add these two lines:
effectSource.Identity = new ContentIdentity();
effectSource.Identity.SourceFilename = input.name;
//End of correction
EffectProcessor processor = new ...
Set Game.Content.RootDirectory to the path you want and then just specify the file name portion. But keep in mind that you still have to include them in the Content project.
If you don't want to/can't do that, then forgo the ContentPipeline altogether.
Found it! For those solutions that have a content project included you just have to add the data inside the main project and NOT the content. You must also make a copy of the data in the bin folder of the release.
The code you have provided works fine.
Create a new XNA 4.0 Windows project. Right click on the Content project and add a new item. Choose "XML File". Open that created file and fill it with the content you have in your question.
Then add the line:
System.String hello = Content.Load<System.String>("NewXmlFile");
To your LoadContent method. Be sure ...
I had the same problem, I constantly have to add/remove items from the Content Project and it's a pain to keep it updated. It becomes especially difficult if you create the folder structure outside of Visual Studio.
The solution I went for was to create a tool that generates the Content project file for me upon request/build. This means that I can create ...