• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

C# XNA DataContractSerializer problem

Status
Not open for further replies.
Level 15
Joined
Oct 18, 2008
Messages
1,588
Hey guys,

I have a kinda strange problem with my project. I want to use the DataContractSerializer to serialize the model of my game with the references intact to make circular references work, but I have a problem importing the necessary assemblies.

After adding the serializer to the code, I get the following errors during building:

[highlight]Error 3 The type 'System.Xml.XmlWriter' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Users\Dániel\Documents\Visual Studio 2012\Projects\GameLibs\SpaceshipConquest\SpaceshipConquest\SpaceshipConquest\Model\GameState.cs 47 13 SpaceshipConquest[/code]

[highlight]Error 4 The type 'System.Xml.XmlReader' is defined in an assembly that is not referenced. You must add a reference to assembly 'System.Xml, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. C:\Users\Dániel\Documents\Visual Studio 2012\Projects\GameLibs\SpaceshipConquest\SpaceshipConquest\SpaceshipConquest\Model\GameState.cs 62 21 SpaceshipConquest[/code]


Since the System.Xml assembly is already referenced I've tried to change the reference version in the project file - but this lead to a new error during runtime:

[highlight]File or assembly name 'System.Runtime.Serialization, Version=4.0.0.0, Culture=neutral, PublicKeyToken=B77A5C561934E089', or one of its dependencies, was not found.[/code]

Any idea how to solve this?
 
Status
Not open for further replies.
Top