Is there any way to reference (in XAML) an assembly with spaces in its name?

后端 未结 2 862
花落未央
花落未央 2021-01-12 02:59

Is it not possible to reference an assembly that has spaces in its name? Do I really have to rename my assemblies to not contain spaces? Is there no way to escape the spaces

2条回答
  •  情歌与酒
    2021-01-12 03:20

    This looks like the bug you're referring to, which is 'fixed'...

    I've just had a similar problem with a ValueConverter in a separate assembly, and the way to get it to build was to include a default constructor in my ValueConverter class. Without that, VS won't build it if it's contained in an assembly with spaces in the name.

    Unfortunately, it builds but then falls over with a XamlParseException when I actually run it up.

    If I do the same referencing an assembly without spaces, everything is fine.

    As an aside, you're defining the xmlns:local namespace but referencing a different assembly - if your namespace is indeed local you can just do:

    
    

提交回复
热议问题