C# VSIX-无法加载引用dll的程序集(VisualStudio 2015)
我在VisualStudio 2015中新创建的VSIX项目中引用了MaterialDesignThemes.Wpf.dll和MaterialDesigncolors.Wpf.dll。然后我在网格标记之间添加了下面的代码C# VSIX-无法加载引用dll的程序集(VisualStudio 2015),c#,wpf,visual-studio-2015,vsix,vsixmanifest,C#,Wpf,Visual Studio 2015,Vsix,Vsixmanifest,我在VisualStudio 2015中新创建的VSIX项目中引用了MaterialDesignThemes.Wpf.dll和MaterialDesigncolors.Wpf.dll。然后我在网格标记之间添加了下面的代码 <Grid.Resources> <ResourceDictionary> <ResourceDictionary.MergedDictionaries>
<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>
它构建成功,但运行时我收到一个异常,说
设置属性“System.Windows.ResourceDictionary.Source”引发错误
例外。内部异常无法加载文件或程序集
'MaterialDesignThemes.Wpf
即使我不能添加自己的类库(class1.dll)
非常感谢您在这方面提供的帮助您是否使用了x86编译库,并且使用的是x64或x64?@lokusking x86,即使它不适用于使用相同配置构建它的类库。它可以引用,但不能使用。您是否已将此dll添加为nuget软件包或类似软件包,或者是手动添加的?听起来像是一个底层dll被删除了,被添加为nugget,被添加为dll,也被添加为新项目。没什么可看的