Troubleshooting Windows Presentation Foundation Install Issues

By my reckoning, the most recent Feb 2006 CTP of WinFX represents the eleventh public release for Windows Presentation Foundation. (And I'm going to step out onto a limb and conjecture that we've probably got just three or four CTP-style releases to go before we release WinFX.) Most of these releases have of course come with a variety of associated paraphenalia, including SDKs, developer tool extensions and even dependent applications such as Microsoft Max or Expression Interactive Designer.

Moving from release to release is an inexact science. It doesn't take a mathematical genius to figure out that there are hundreds of combinations of different build histories on machines out there, and inevitably (since the setup process is also beta) there can be bits of cruft left over on machines after one element or another is installed. The comments on the entry I wrote to announce EID are a good reminder for us here that we've not cracked this yet. I can't offer a panacea, unfortunately - it's the price we all pay for being early adopters of a new system-level component that integrates tightly with the rest of the operating system - but I did want to offer some tips to try and mitigate the worst of the pain and help people get their machines clean. (Not that this will be of any comfort, but it's not any easier internally, where there are daily builds from multiple build labs to deal with!)

  1. By far the most important step is to make sure that you've uninstalled all the components of older versions before updating to the latest release. Go into Add / Remove Programs and check for any of the following:

    • Microsoft Windows SDK (or WinFX SDK)
    • Microsoft Visual Studio Code Name "Orcas" CTP for WinFX (known in earlier versions as the Visual Studio Extensions for WinFX)
    • Debugging Tools for Windows (installed by the Windows SDK)
    • Microsoft Command Shell (installed by the Windows SDK)
    • Microsoft FxCop (installed by the Windows SDK)
    • WinFX Runtime Components
    • Microsoft Codename "Avalon" (this stems back from the days before we distributed as part of WinFX)
    • Microsoft Max
    • Microsoft Expression Interactive Designer
    • Microsoft Expression Graphic Designer

It's probably safest to uninstall all of the above just to be sure, making sure you leave the WinFX Runtime Components until last.

  1. Once you've uninstalled everything you can, we have an uninstall tool that helps clear up any other unwanted files. This helps with a few known situations where the uninstaller fails to remove a few shared assemblies successfully.

  2. The first two steps should get you into a position where you can install a fresh new release. If you're still having trouble, we need to get down to the next level of investigation. Perform steps 1 and 2 again to get back to semi-clean. Then it's worth checking the contents of the following directories:

    • %WINDIR%\Microsoft.NET\Windows
    • %WINDIR%\WinFX\v3.0\WPF
    • %PROGRAMFILES%\ReferenceAssemblies\Microsoft\WinFX\v3.0

I've seen occasions before where one or two older files can get left over in these directories that can fool installers such as Expression Interactive Designer, or worse, can prevent newer versions from being installed. In particular, if you see files such as PresentationCore.dll, PresentationFramework.dll or WindowsBase.dll, that should act as a warning sign to you that you've got some left-over cruft. Make sure you don't just randomly delete the content of these directories unless you're sure that the uninstallers have done all they can do - you start to edge into completely unsupported territory at this point, since it's hard to troubleshoot a system in this state.

  1. If your machine has had a chequered history with many older versions of WinFX on your machine, you might want to try running Dan Mohr's Avalon cleanup script, which looks for various system DLLs such as milcore.dll (the Media Integration Layer, a low-level component that renders WPF content to screen) and cleans them and their associated registry entries out.

  2. For Expression Interactive Designer, if all else fails, you can use the undocumented SKIPAVALONVERSIONCHECK=1 parameter at the command line to force EID to install without heed to the version of WPF it detects on the machine. Make sure you've successfully executed an application with the appropriate version of WinFX on your machine prior to using this brute-force approach. For example, Valentin Iliescu has a great 3D Chess game implemented as a XAML Browser Application that can test whether you have a fully working WinFX Runtime Components installation.

  3. When recompiling an application from a previous build, I've found that it's safest to entirely clear out the bin/ and obj/ directories from your project before attempting a rebuild. Sometimes left-over object files from a previous release can cause rogue build breaks.

  4. Make sure you have Windows Media Player 10 installed on your machine if you want to show media elements.

  5. It's important to run the latest available updated display card drivers for your machine. Because of the way WPF uses DirectX (multiple non-fullscreen windows), we've uncovered a number of display driver bugs that can cause crashes or other unintended effects. We try and mitigate this by switching to software rendering for older drivers, but that inherently reduces the performance of all WPF applications. If you can, get current!

That's all the tips I can think of for now. I'll update this entry as appropriate over the next day or two with any corrections or additional suggestions. I'll sound like a faceless corporate automaton if I apologize for any inconvenience caused, but I do mean it! In an ideal world we'd do a better job in the installer of cleaning up old installs, but that would really detract from the purpose of CTP releases, which is to get regular updates out to the developer community without imposing a heavy burden on the developer team. I hope this post at least helps to explain the trade-off, even if it's still not all that pleasant for us in the trenches.

Comments (11)
  1. Anonymous says:

    Tim Sneath has written an excellent blog post [1] about what to do if you’re having any issues installing…

  2. JoeW says:

    Tim, your last point on the display drivers is a pain.  Most laptop manufacturers limit the distribution of drivers through their own site and are updated very infrequently.  Even with the ‘SkipDateCheck’ registry setting my tablet falls back to software mode if I use the shipped driver from 2004.  If I hack in the latest Nvidia driver it works fine – but then I lose some tablet specific features.  I hope MS is putting pressure on the latop manufacturers to update their drivers – or even better get the drivers shipped out on Microsoft Update.

  3. Tim Sneath says:

    We hear your pain, believe me – it hurts us too. But given a trade-off between a risk of applications running slowly or a risk of applications bringing down your whole machine with a BSOD, I think most people would prefer the former, at least as a default. As you mention, we have a registry switch that disables the driver check.

    One slight mitigating factor is that we’ve been working intensively with the major graphics card vendors to make sure that the new WDDM drivers they’re building for Windows Vista work seamlessly in this situation, so on Windows Vista this shouldn’t be a problem: all the in-box drivers will support hardware rendering. And yes, we want to strongly encourage graphics card manufacturers and OEMs to ship updated WHQL-certified drivers that run WPF really well. It’s in their interest too, since otherwise their graphics cards look lousy.

    We’re caught between a rock and a hard place, but hopefully things will greatly improve within the next year.

  4. Anonymous says:

    tried to install trial from msoft site says missin cab or something during install and rolls back

  5. Tim Sneath says:

    Hi Scott, tried to install the trial of what? Can you give me the URL you used? What was the error message? Thanks, Tim

  6. Anonymous says:

    just wanted to add for the ppl with dual core amd cpu’s: there is currently a bug that will crash hard on about everything.

    The workaround is to use taskmanager and set the affinity of the proces to one processor only. (right click on the proces, select: thread affinity).

  7. Anonymous says:

    I would just like to say thanks, between your helpful hints here and some advice from Unni on getting my Dual Core functional I am up and testing. Although I admit I did end up calling product activation again because after running the install tool on the xp 32 bit install I got some complaint from the OS about the SQL DUMPER library not being installed that I couldn’t get rid of thru uninstalls and reinstalls. I have only ran the Express version of SQL Server 2005 ever on that box and I thought the initial beta removal did what it should, but something was shy of working. Anyway, thru normal channels and your very helpful blog I got this working YEAH..

    Now I am busy writing a "smart client" that uses both WCF and WPF to playback files from my projects authoring environment and I am getting some really cool results very quickly with the actual technology.. I cannot thank you enough..  My animated title server and content playback tool is now well on it’s way..

  8. Anonymous says:


    i tried to install EID but at installer start, it alets me "You must install Windows Presentation Foundation6.0.5295.60113 before installing MS EID".

    I’ve allready installed WinFx Components CTP February but it seems not to recognize the last version and my XAMLPAD generates a Windows Exception. I will try all your advices but if you have an idea i’ll be glad to here it ! If i found solution, i inform you !

  9. ben2004uk says:

    I am having the same problem as Phil.  Installed ontop of Vista 5342 x86 Client

    Installed Visual Studio 2005 Professional – all cool.

    Installed WinFX Runtime Componments Feb CTP – no errors

    Installed Windows SDK Feb CTP – No Errors

    Installed Oscar – No Errors

    Tried to install March CTP of Expression – error with "Must install WPF

    version 6.0.5295.60113 before installing MS Expression Interactive Designer"

    Tried with the Jan CTP and got the same error.

    Tried to launch XAMLPad and it crashes out straight away.  Debug the

    application and it returns the error:

    Could not load fuke ir assembly "PresentationFramework, Version=3.0.51116.0"

    Created a new project in VS 2005 for WinFX – tried to launch a XAML app – worked fine.

    Tried to repair both installations – still the same.

    Any information would be great!! cheers Ben

  10. Anonymous says:

    I’m having the same issue as Phil. My XAMLPad also bombs.

    I also get a trust exception when browsing to Valentin’s WinFX chess program (not sure if this is related though).

    I’m trying step 2 (uninstall tool) now. But it’s trying to uninstall SQL Server 2005 stuff, which worries me! I did have SQL2005 betas on this machine, but I uninstalled them when I installed the final released version.

    Phil – did you also have SQL2005 betas on your machine?

  11. Anonymous says:


    What is "paraphenalia" . . . Paragraph 1?

    I’m assuming "chequered history" is a British version of what Yankees would call a "checkered past."

    This is a very helpful article – especially for intrepid (American) English majors who occasionally brave the beta world.

    We’re having a ball with Expression Interactive Designer.

    We do appreciate you.


Comments are closed.

Skip to main content