Wednesday, January 25, 2006 11:29 PM Erwyn van der Meer

Solved a WinFX Runtime Components CTP problem

Ever since the November 2005 CTP of WinFX I have had trouble running any Windows Presentation Foundation (WPF) sample application on my machine. Every WPF program would crash on startup with weird BAML related exceptions. Even freshly created WPF programs in Visual Studio 2005 with a single empty form refused to run. I wasn't able to find a solution at the time.

Last week Microsoft released the January 2006 CTP together with the first public release of Microsoft Expression Interactive Designer aka "Sparkle". Guess what, "Sparkle" crashed on startup on my machine as well. That was to be expected, since "Sparkle" is a 100% WPF managed code application.

Because I saw great demos of this "Avalon" design tool at PDC05, I badly wanted to be able to run this application. So I had to invest some time in fixing my problems. 

Luckily, our ASP.NET 2.0 application for Windows Media Center is done. After two months of hard work I have time to look into WinFX again. Expect more details about that Media Center project as soon as it goes live. Well it is semi-live already, meaning you can access it on the Internet if you know the URL, but I cannot divulge that information just yet.

This time Google led me to this blog entry by Nick Kramer. Nick describes that WPF scans every assembly in the Global Assembly Cache (GAC) and chokes if it cannot read one of those assemblies. The troublemaker on my machine turned out to be the Microsoft Enterprise Instrumentation Framework. It tries to load the .NET 1.0 version of System.Management, which I don't have installed on my machine. Removing Enterprise Instrumentation fixed my problem.

So I can finally run WPF applications again.

Filed under: ,

# re: Solved a WinFX Runtime Components CTP problem

Thursday, January 26, 2006 12:36 AM by Nathan Pledger

Interesting. I re-ran Microsoft Max after receiving a book from my manager on Avalon (I don't know why, I can't see any opportunity to have a project whereby the result is an attractive desktop-bound app) and it broke my VS.NET 2005 install. Luckily a repair fixed it and I didn't lose the plethora of configs I have made to it.

As an aside, Erwyn, I have now got a MCE installation and would be interested in your views on developing for it. I am becoming involved in a competing product called Media Portal, which I am keen to make as usable - if not more usable (which is quite simple, tbh) than MCE.

I am now using MCE full-time in the lounge, though, so that is an endorsement!

# re: Solved a WinFX Runtime Components CTP problem

Thursday, January 26, 2006 6:18 AM by Erwyn van der Meer

Hi Nathan, Microsoft Max is one of the very few WinFX projects that lag far behind in the monthly CTP cycles for WinFX. Their latest public release runs on the September CTP of WinFX which uses a pre-RTM version of the .NET Framework 2.0.

A sneek preview of my upcoming Windows Media Center posts:
Our Windows Media Center optimized web application was developed in ASP.NET 2.0. The application also works in Firefox and other browsers. That's because we use XHTML 1.0 Strict + CSS 2.1 and degrade gracefully if JavaScript is not available. That is quite a departure from the standard WMC SDK samples ;)

# Windows Vista RC1 Tools

Friday, September 08, 2006 4:20 AM by Erwyn van der Meer

Tim Sneath has a more complete list of all Windows Vista RC1 and .NET Framework 3.0 related downloads