XAML does not update when debugging on a WP8 device

I'm having a problem deploying to Windows Phone 8 on my device. It seems that XAML doesn't update when I build and debug. The only way, apparently, to update is when I do Rebuild> Debug or uninstall the application and then debug it.

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

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

If you debug Rebuild, then it will work as expected. Re-creating every time I need to deploy is PITA because I am losing isolated storage.

Can someone clarify what is going on here?

NOTE. This happens with the Windows Phone 7.x application in Visual Studio 2012 Update 3 on Windows 8.

+6
source share
3 answers

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

0
source

I noticed similar problems with sample projects from Microsoft. Are you using any weird characters in your file path, such as "#"? C # just breaks the assembly. Alternatively, you can try deleting suo files.

If all else fails, open the /obj/Debug/.../.g.cs and .gics files. Visual Studio should ask you to reload them if they change.

+1
source

This is not just a problem with a Windows phone. Ive had the same problem in WPF applications. This MSDN article describes XAP files quite well.

Here are the suggestions:

β€’ Was installed correctly in the XAP target file (software source with code)

β€’ Was there a memory overflow exception during compilation in your environment?

β€’ Is your Silverlight project linked to the web application in the solution? If not try to do it; If yes...

β€’ Do you only compile a silverlight project or website?

β€’ Have you confirmed that you have no problem caching an AND / OR IIS browser or web host?

β€’ Was the Silverlight XAP file used at this particular moment?

The solution that resolved the OP issue in this article was to install an updated version of Silverlight for VS

0
source

Source: https://habr.com/ru/post/950621/


All Articles