Archive for August, 2010

Windows Phone 7 – XAML designer fails to resolve font resources

August 24, 2010 9:55 pm

This evening I was attempting to go through the first lab of the Windows Phone 7 Developer Training Kit and discovered that I couldn’t even finish the first exercise because Visual Studio wouldn’t resolve the resources for the fonts used in the project. Nothing showed up in the XAML designer view, so I couldn’t follow the lab directions. I guess I could have just worked my way around this, but not having the XAML designer work while creating a phone app seems to be a bit of a problem. So I mentioned the situation to a room full of fellow “Learn Windows Phone 7” travelers, and someone (sorry, I don’t remember your name) said “Try a repair on the tools”. An hour later (slow dev box, plus had to download a bunch of stuff to be able to do the repair) and the XAML designer works again!

Along the way, I discovered that the lab exercises solution files show a different icon in Windows Explorer than the ones I create using VS 2010. The reason is that the lab exercise .sln files contain the following line:

# Visual Studio 2010 Express for Windows Phone

which results in this icon image (see the tiny phone next to the “10”?),

whereas the ones I create contain this line instead:

# Visual Studio 2010

which results in this icon image (no tiny phone)

When I open a .sln file with the former line in it, the Express version of VS2010 runs. When I open a .sln file with the latter line in it, the regular version of VS2010 runs. Strange. It seems that the line is just an innocent comment, but apparently not quite. Either way, after repairing the toolset both solution files allow me to work in the XAML designer.