Async & exceptions in C#

This quick post is motivated by a question on StackOverflow. Basically it is a simple console program you can run to see how exceptions are handled in C# async methods. Common wisdom is “don’t have async void methods; always return a Task” but that simple signature change is neither necessary nor sufficient to handle exceptions…


New "Missing Platform APIs" UserVoice site for Windows Store development

Hopefully you are familiar with the existing WPDev UserVoice site, where you can provide suggestions (or vote on others’ suggestions) for developer features to add to Windows. Note that “WP” now stands for “Windows Platform” instead of “Windows Phone,” and it is intended to encompass all flavours of Windows. We’ve just added an additional sub-site…


Updated LayoutRules Code

I updated the LayoutRules sample attached to the //build/ post I made the other day. This version is much more comprehensive and easier to use. The sample usage is slightly more realistic, as well. At its core, the sample exposes a LayoutableUserControl and a LayoutablePage that let you specify a set of layout rules that…


Optimum Emulator Sizes for Windows Phone 8.1

[4/4 changed typo: 1080p -> 720p] As I mentioned in my //Build talk, the emulator is not a good place to perform visual verification of assets because the display characteristics of your monitor are highly unlikely to match those of any physical devices. But it is an excellent tool for verifying the layout of your…


//Build talk "From 4 to 40 inches" (with sample LayoutRules code)

[Update 4/6/2014: I uploaded a newer and better sample; see the end of the post for a link] Thanks to everyone who made it to my talk, which is now available online (so if you didn’t make it, you can watch it now!). Also, thanks to everyone who has provided feedback so far! If you…


Opening a Windows Phone project after you have upgraded SQLite

If you are using the SQLite for Windows Phone package in Visual Studio, and you install one of the upgrades (which happen relatively frequently), the next time you open C++ project that references SQLite the project will fail to load with an error similar to this in the Output window: D:\Path\ProjectName.vcxproj : error : Unable…


Trying something new: the Windows Phone Developer Blog

This year, the Windows Phone team is trying out something new for our blogging activity: instead of having individual team members post content on their personal blogs, we’re centralizing the content in the Windows Phone Developer Blog to make it easier for you to discover and keep up with what’s going on. Some of you…


Revisiting an old post – Application.Terminate

Well, I already did that once today, but in doing so I realized I should address another old post (or two). Yes, in Windows Phone 8 we have added the Application.Terminate method so that you can quickly exit your application in the case of insurmountable roadblocks such as the user refusing to accept the EULA…


Images for Threat Modelling Post

Recently I’ve had several folks ask me for the images for my Threat Modelling Post, which have disappeared due to various back-end changes over the years. The first few times I just e-mailed the Visio diagram, but more people are asking so I updated the post with the images.


Update on sample code

A lot of people are asking for access to the SQLite wrapper I demoed at //build. Rest assured we are working on getting it out to you but it is taking some time. Also I should set expectations in that it is by no means a complete wrapper for all SQLite features but does allow…