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.

One thought on “Solved a WinFX Runtime Components CTP problem

  1. 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 😉

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *