VSIX - 无法加载引用的dll的程序集(VisualStudio 2015)

时间:2017-01-20 05:11:32

标签: c# wpf visual-studio-2015 vsix vsixmanifest

我已将MaterialDesignThemes.Wpf.dll和MaterialDesigncolors.Wpf.dll引用到VisualStudio 2015中新创建的VSIX项目。然后我在网格标记之间添加了以下代码

 <Grid.Resources>
            <ResourceDictionary>
                <ResourceDictionary.MergedDictionaries>
                    <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Light.xaml"></ResourceDictionary>
                    <ResourceDictionary Source="pack://application:,,,/MaterialDesignThemes.Wpf;component/Themes/MaterialDesignTheme.Defaults.xaml" />
                    <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Primary/MaterialDesignColor.DeepPurple.xaml" />
                    <ResourceDictionary Source="pack://application:,,,/MaterialDesignColors;component/Themes/Recommended/Accent/MaterialDesignColor.Lime.xaml" />
                </ResourceDictionary.MergedDictionaries>
            </ResourceDictionary>
        </Grid.Resources>

它构建成功,但在运行时我得到一个异常说,

  

设置属性&#39; System.Windows.ResourceDictionary.Source&#39;扔了一个   例外。内部异常无法加载文件或程序集   &#39; MaterialDesignThemes.Wpf

即使我无法添加自己的classlibrary(class1.dll)

非常感谢您对此事的帮助

0 个答案:

没有答案