Search code examples
visual-studio-2012windows-phone-8visual-studio-debuggingwindows-phone-8-sdk

XAML is not updating when debugging on a WP8 device


I am experiencing a problem when deploying to a Windows Phone 8 device. It seems the XAML is not updating when I do a build and debug. The only way it seems to update is when I do a Rebuild > Debug or uninstall the app then debug.

Here is a scenario: A page contains a button with a click event named "Button_Click". I debug and everything works. Stop debugging. Now change the event handler's name to NewButton_Click (yes, in both xaml and cs). Start debugging again, click the button and you get an exception because there is no event handler name "Button_Click"

The XAML changes were not detected/pushed to the device, only the Csharp ones were.

If you do a Rebuild then debug, it will work as expected. Rebuilding every time I need t deploy is a PITA because I lose any isolated storage.

Can someone clear up what is happening here?

NOTE: This is happening with a Windows Phone 7.x app in Visual Studio 2012 Update 3 on Windows 8.


Solution

  • Does the project name contain (or the folder it is in) any spaces? In my case, removing the spaces solved the problem.