Referencing external assemblies using MCML

MCML is Windows Media Center Markup Language.  You use it to define the GUI for your Windows Media Center applications.

I’ve been banging my head against the wall trying to get a reference to a .NET assembly to work in MCML.  The example in the documentation uses the syntax:


Where MSCorLib is the name of the assembly in the Global Assembly Cache.

This worked fine for me where the assembly contained the current Media Center Application:


However when I wanted to reference a different external assembly (that was also in the GAC) I was getting an error loading the MCML page, indicating that the assembly could not be loaded.

In the end I found out that I needed to use a strong assembly name:

xmlns:ext="assembly://ExternalAssembly, Version=, Culture=neutral,

I guess this is pretty obvious, but I’m also guessing that I won’t be the only one to waste an hour or so on this.  The documentation doesn’t give an example like this (just the weak named reference), although it does give strong named examples for resource references.

4 thoughts on “Referencing external assemblies using MCML

  1. Jon

    I had this problem too with local assemblies… if you are walking through the sample and you have installed your media center app then assembly://MceAppAssembly/SomeNamespace will actually pull the assembly MceAppAssembly from the GAC.

    If you have just added your custom class to SomeNamespace then it isn’t going to be in the assembly that the GAC knows about.

    The solution is to run DevInstall /u if you are using that command from the WMC SDK. If not the command is:

    %ProgramFiles%Microsoft SDKsWindowsv6.0Abingacutil.exe /if “pathtoyourregisteredassembly”

  2. Gerard

    oh i am so happy i found these posts… both what Jon and damien have said have solved my last few hours trying to work out why i kept getting an error saying cannot find type… THANKS GUYS ! 🙂


Leave a Reply

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