XNA Creators Club Online
Page 1 of 1 (4 items)
Sort Posts: Previous Next

How to use IntermediateSerializer in Xbox360

Last post 3/19/2007 10:13 PM by UDKarinto. 3 replies.
  • 3/17/2007 1:32 PM

    How to use IntermediateSerializer in Xbox360

    Hello,

    I created Windows Game project.

    In that project, I use IntermediateSerializer.Deserialize method to read settings from XML file.

    It works fine.

    But when I tried to port that project to Xbox360, I found "Microsoft.Xna.Framework.Content.Pipeline" assembly does not exist in references for Xbox360 --- "Program Files\Microsoft XNA\XNA Game Studio Express\v1.0\References\Xbox360" directory.

    I tried to add "Microsoft.Xna.Framework.Content.Pipeline" assembly from "...\References\Windows\x86" directory and add to code "using Microsoft.Xna.Framework.Content.Pipeline.Serialization.Intermediate;", but many build errors occured.

    They say "The type 'System.Xml.XmlReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'".

    Of course, before I added reference to Content.Pipeline assembly and using statement, no build error occured.

    Refer to MSDN document , IntermediateSerializer.Deserialize method is supported in "Xbox 360, Windows XP SP2".

    But I can't find how to use IntermediateSerializer.Deserialize in Xbox360 project.

    Are there any methods? I love IntermediateSerializer class!

  • 3/19/2007 4:06 AM In reply to

    Re: How to use IntermediateSerializer in Xbox360

    Heja...

     For XBOX360 Projects the System.XML assembly isn't reference by standard so you have to do this by hand.

    It generally would be better to sepperate your Classes, wich uses Content.Pipeline, to an assembly and reference it in your executeable project.

    have a nice day...
    markus

    ----------------------------------------------
    Austria? Where the f*** is Austria?
  • 3/19/2007 1:22 PM In reply to

    Re: How to use IntermediateSerializer in Xbox360

    The IntermediateSerializer class is part of the content pipeline, which is only available on Windows. This was only designed for use while building content, and not intended to be used directly by game code.

    The underlying .NET XML support (XmlReader, XmlWriter, XmlDocument, XmlSerializer, etc) are available on Xbox, however. 

    XNA Framework Developer - blog - homepage
  • 3/19/2007 10:13 PM In reply to

    Re: How to use IntermediateSerializer in Xbox360

    Thanks rockaut, Thanks ShawnHargreaves.

    I will add reference to system.xml for xbox360 and use XmlSerializer instead of IntermediateSerializer.

    Thank you very much.

Page 1 of 1 (4 items) Previous Next