pyRevit with MaterialDesign from XAML

Hi,
I’m trying to use the material design libraries in a wpf window created with pyrevit.
To do that, I add the clr reference to the material design libraries dll’s as such:

clr.AddReference('MaterialDesignColors.dll')
clr.AddReference('MaterialDesignThemes.Wpf')

Then, in the XAML for the window I add:

<Window.Resources>
        <ResourceDictionary>
            <ResourceDictionary.MergedDictionaries>
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
                <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Button.xaml" />
            </ResourceDictionary.MergedDictionaries>
        </ResourceDictionary>
</Window.Resources>

At this point, when opening my XAML in Visual Studio I can already see the styles from Material Design being applied.
The problem is that when I run my script, I get the following error:

Can you help me figure out what’s missing? Is it even a problem with pyRevit or ironpython itself?