Serialization in an WP7 project

So if you want to do some basic serialization in your Windows Phone 7 app, (cerealization to my kids) image 

you most likely will start here.  However, if you copy/paste the code an out of the box project, you get the dreaded wiggly red line:


What is going on?


Oh crud.  The default for MSDN is .NET Framework 4.  When you switch it to Silverlight, you see that you need a reference to System.Xml.Serialization.


Out of the box, WP7 projects don’t have a reference to System.Xml.Serialization – only System.Xml.  Once I add that assembly to the project, we get the happy blue:


This is a bit confusing, to say the least.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: