title: Why is my IsolatedStorage whiped when I rebuild my Windows Phone 8 project?
body: <p>There are several questions on StackOverflow about the same topic, but I haven't found the solution.</p>
  
  <p>In my Windows Phone 8 App I store user settings in the <code>IsolatedStorage.ApplicationSettings</code>.
  This works great, I use <code>IsolatedStorage.ApplicationSettings[key] = value</code> to set my values and ofcourse use <code>IsolatedStorage.ApplicationSettings.Save()</code> to save them.
  I have also created a database using a .sdf file to save local data.</p>
  
  <p>When I use the <code>Deploy</code> function in VS2013(Visual Studio 2013) to update my app, the isolated storage settings will remain.</p>
  
  <p>However, when I have used the <code>Rebuild</code> or <code>Clean</code> function in VS2013, the isolated storage will be whiped on the next deploy! Resulting in the deletion of all local data and usersettings.</p>
  
  <p>Why does this behavior occur?</p>
  
  <p>A work-around would be to not use these functions, I could basically do all my work from development to deployment without using <code>Rebuild</code> or <code>Clean</code>. But when I would (accidentally) use these functions I would be unable to deploy without whiping all local data on the devices.</p>
  
  <p>This behavior also occurs when I upload my App to the Windows Phone Beta Store. (I haven't used the live store yet)</p>
  
  <p>UPDATE:</p>
  
  <p>Thanks to robwirving I have some new insight: <code>XapDeployCmd.exe</code></p>
  
  <p>This is a tool that can perform all the deployment tasks that Visual Studio normally does for you, in command prompt. The relevant actions are <code>installlaunch</code> and <code>update</code>.</p>
  
  <p>I think VS performs an <code>installlaunch</code> action when the deployment process detects the project has been rebuild. However, if I use the <code>update</code> action with XapDeployCmd on a Xap build by Visual Studio, which has been <code>Cleaned</code> and <code>Rebuild</code>, the isolated storage is NOT whiped. </p>
  
  <p>Could it be that the Windows Phone Beta Store mimics this behavior?</p>