Referencing external assemblies using MCML
March 9th, 2008
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:
xmlns:cor="assembly://MSCorLib/System"
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:
xmlns:ext=“assembly://MceAppAssembly/SomeNamespace”
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=1.0.0.0, Culture=neutral, PublicKeyToken=0123456789abcdef/SomeNamespace"
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.


February 25th, 2009 at 6:11 am
What about a class library from the same solution. I too am scratching my head.
February 25th, 2009 at 7:14 am
i got the class library to work via the tokencode method above, however i can’t get a local file to work. just get Error 14 Unable to find type ‘ChannelList’.
December 7th, 2009 at 1:02 am
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 SDKs\Windows\v6.0A\bin\gacutil.exe /if “pathtoyourregisteredassembly”