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.
I have noticed similar issues with the sample projects from Microsoft. Are you using any strange characters in your file path like '#'? The C# would just break the build. Also, you can try deleting your suo files.
If all else fails, open your /obj/Debug/.../.g.cs and .g.i.cs files. Visual Studio should ask you to reload them if they change.
This is not just a windows phone problem. Ive had this same problem in WPF apps as well. This MSDN Article covers it pretty well for XAP files.
Here is the suggestions:
The solution that resolved the OP problem in this article was installing an updated version of Silverlight for VS
Does the project name contain (or the folder it is in) any spaces? In my case, removing the spaces solved the problem.