Windows was unable to communicate with the target application

When you develop Windows 8 Store apps, sometimes Visual Studio and the debugger process don’t play nice together. You know when it happens. The title bar turns white, applications are not responding and you find yourself trying to kill all hanging processes

It happened to me yesterday and every time I tried to run my app, this is what I got:


I’ve experienced strange Windows Store app errors before and I thought it must have been caused by force-quitting my processes.

XAML problem

It turned out, something else caused the problem. Do you remember what happened if you made resource errors in Silverlight? Most of the time, your screen went white. If you were lucky, the debugger would tell you a resource is missing.

In my case there was also a resource problem that coincided with the debugger hanging!

So what happened? I needed a button style and took it out of the commented section in Common/StandardStyles.xaml and placed it just before the AppBarButtonStyle.



The SkipBackAppBarButtonStyle was based on AppBarButtonStyle but defined just before AppBarButtonStyle. This is not allowed in XAML! I moved it just below AppBarButtonStyle and everything was fine.

Written by Loek van den Ouweland on January 06, 2013. Questions regarding this artice? You can send them to the address below.
By using this site, you acknowledge that you have read and understand our Cookie and Privacy Policy.