Content.Pipeline

Hello,

I have been reading a few tutorials about XNA and have been following them and everything is just fine. Except in one of the tutorials they reference Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate. I cant seem to figure out how to do that. I remember even having trouble in XNA doing that. Does anyone have any suggestions?

That namespace doesn’t seem to exist in MonoGame, as I’m sure you’ve noticed. I’m not sure what the tutorial you’re reading was trying to do, but if you want to learn how to use MonoGame’s content pipeline, start here.

Dont understand. It says to replace this:

The first step is removing all Microsoft.Xna.Framework.XXX references and replacing them with references to MonoGame.Framework and MonoGame.Framework.Content.Pipeline. This is required as you will no longer be building against Microsoft XNA.

Yet MonoGame.Framework.Content.Pipline doesnt exist either. The more I use Monogame the less it actually seems like XNA. Dont understand

What is the tutorial trying to do? What is its objective? Is it just to load content using the content pipeline?

And of necessity, MonoGame cannot be exactly like XNA. But the people working on MonoGame definitely always have XNA compatibility in mind when making changes or additions.

Trying to serialize and deserialize XML files for a level editor.

        public static void Serialize<T>(string filename, T data)
    {
        XmlWriterSettings settings = new XmlWriterSettings();
        settings.Indent = true;

        using (XmlWriter writer = XmlWriter.Create(filename, settings))
        {
            IntermediateSerializer.Serialize<T>(writer, data, null);
        }
    }

    public static T Deserialize<T>(string filename)
    {
        T data;

        using (FileStream stream = new FileStream(filename, FileMode.Open))
        {
            using (XmlReader reader = XmlReader.Create(stream))
            {
                data = IntermediateSerializer.Deserialize<T>(reader, null);
            }
        }

        return data;
    }

Here’s a topic about serialization, and another. Hopefully that’ll help, I don’t know anything about serialization, so the best I can do is find related topics. Sorry about that, and good luck.

You need to add an assembly reference to MonoGame.Framework.Content.Pipeline.dll. That is the assembly that contains that namespace.

Also, are you using MonoGame from the installer or from source?

Fairly certain I used the installer. And i looked around everywhere on my computer but never could find MonoGame.Framework.*** anything. I only seem to have MonoGame.Framework and a bunch of Sharpx things.

It’s in Program Files(x86) > MSBuild > Monogame > v3.0 >Tools.

1 Like

Hardcore AJP! Thank you!

Yeah, not a problem.

either of you happen to have an answer for this question?

I don’t. I’ve never tried using a controller with MonoGame before, and don’t have any on hand to try it out.

[quote=“Ostridge, post:9, topic:6472”]
I only seem to have MonoGame.Framework and a bunch of Sharpx things.
[/quote]Without MonoGame.Framework.Content.Pipeline.dll, the content build pipeline would not work (the Pipeline GUI and MGCB.exe). I believe it is in C:\Program Files (x86)\MSBuild\MonoGame<version>\Tools.

And now I see AJP answered that already.