Over a million developers have joined DZone.

Dealing with a Windows Phone App "Unspecified Error"

DZone's Guide to

Dealing with a Windows Phone App "Unspecified Error"

· Mobile Zone
Free Resource

Launching an app doesn’t need to be daunting. Whether you’re just getting started or need a refresher on mobile app testing best practices, this guide is your resource! Brought to you in partnership with Perfecto

While developing and testing a Windows Phone application you may have to deal with a really annoying problem: your application crashes and the only error reported by Visual Studio is a generic Unspecified error.

Visual Studio itself isn’t of any help, because the error is intercepted by the global error handler available in the App.xaml.cs file, so you don’t have a way to understand where exactly the problem occured.

The solution is easy to understand, even if it’s not easy to find: this error is raised usually when your XAML contains a property with an invalid value. For example, when I had to deal with this error I found that, by mistake, the Margin property of a control contained the value 0k, 0, 0, 15, that is obviously not correct (the margin property accepts only numeric values).

To help understanding where your application may contain such an error, keep track of the the time when Visual Studio intercept the “Unspecified error” exception: usually, this error is raised only when you navigate towards a page that has this problem.

Keep up with the latest DevTest Jargon with the latest Mobile DevTest Dictionary. Brought to you in partnership with Perfecto.


Published at DZone with permission of Matteo Pagani, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}