DARNIT! The example I found for Windows Phone 7 storage doesn’t work

Translate This Page

DARNIT! The example I found for Windows Phone 7 storage doesn’t work

  • Comments 1


Yep.  I forgot for some reason and just spend several minutes trying to figure out what was wrong with the code in the excellent example:


The article says it is for XNA Game studio.  Right, but it isn’t for the Windows Phone 7, it will work with XNA Game Studio 4.0, Windows base games, but not the phone.  Got that?  Ok.

The problem is that the example, as well as the “StorageDemo” example will not work with Windows Phone 7, you have to change the using statement and some of the code so that it maps to the Windows Phone 7.  Which I am working on, but aren’t ready to share, and may not.

Windows Phone 7 does not support the using statement:

  • using Micorosft.Xna.Framework.Storage;

Instead you need to use the following:

  • using System.IO.IsolatedStorage;

And attempting to add the reference to the Windows Phone 7 project won’t work, you will get an error.

Use this MSDN discussion to get started:

And then App Hub does an AWESOME link page at:


Over and out.

Leave a Comment
  • Please add 2 and 7 and type the answer here:
  • Post
  • Sam, this is Flang from Golden West College's C# class. I was wondering if you can give me your Skype user name so we can talk to you about our Imagine Cup project.  My email is ....  


Page 1 of 1 (1 items)
Generic Content

Legal Note:

  1. The author, Sam Stokes, is an employee of Microsoft
  2. There is no guarantee that anything I write is correct, I do try to make sure that what I write is correct.
  3. Use anything written in this blog at your own risk
  4. Test what I write about before using the information
  • Sometimes posts will disappear because I realized that they really don't fit with the total chaos of what I write about
  • Links are tested and available on date of publication, what others do with their links are out of my control


  • Whatever I write on this blog is unedited by management or anyone, which should be obvious from the randomness of the blog.  I simply write about things I like.
  • Microsoft does not restrict me in anyway, so I generallyblather about whatever I want to.
  • For personal reasons I will not write about:
    • Company confidential stuff, mainly because Microsoft is more transparent than any company I have ever worked for.
    • Other people unless they give me permission to write about them