What's happening is that WPF attempts to assign your markup extension's value to the Resources
property, instead of adding an item to the dictionary. This can be easily solved by:
<Window.Resources>
<ResourceDictionary>
<genericXaml:GenericTypeExtension BaseTypeName="genericXaml:GenericClass`1" x:Key="hanswurst">
<x:Type TypeName="system:String" />
</genericXaml:GenericTypeExtension>
</ResourceDictionary>
</Window.Resources>