Xaml不';我不知道在不同的程序集中定义了哪些对象

Xaml不';我不知道在不同的程序集中定义了哪些对象,xaml,Xaml,当我在一些非UIassembly中添加一个类并在UIassembly中的一些xaml中使用它时,会出现以下错误: Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '22' and line position '55 内部异常: Could not load file or assembly 'XXX, PublicKeyToken=null' or one of

当我在一些非
UI
assembly中添加一个类并在UI
assembly
中的一些
xaml
中使用它时,会出现以下错误:

Provide value on 'System.Windows.StaticResourceExtension' threw an exception.' Line number '22' and line position '55
内部异常:

Could not load file or assembly 'XXX, PublicKeyToken=null' or one of its dependencies. The system cannot find the file specified.":"XXX, PublicKeyToken=null
堆栈跟踪:
位于System.Windows.Markup.XamlReader.RewrapException(异常e、IXamlLineInfo、Uri baseUri)
在System.Windows.Markup.WpfXamlLoader.Load(XamlReader XamlReader、IXamlObjectWriterFactory writerFactory、Boolean skipJournaledProperties、Object rootObject、XamlObjectWriterSettings设置、Uri baseUri)
位于System.Windows.Markup.wpfxamloader.LoadBaml(XamlReader XamlReader、Boolean skipJournaledProperties、Object rootObject、XamlAccessLevel accessLevel、Uri baseUri)
位于System.Windows.Markup.XamlReader.LoadBaml(Stream-Stream,ParserContext-ParserContext,Object-parent,Boolean-closeStream)
位于System.Windows.Application.LoadComponent(对象组件,Uri resourceLocator)
在Pouyansoft.SellEngineering.MVVM.WPF.Letters.View.SelectLetterTemplateView.InitializeComponent()中的d:\NirooTeamProject\NirootTransteamProject\SellEngineering\Pouyansoft.SellEngineering.MVVM.WPF.Letters\View\SelectLetterTemplateView.xaml:第1行
位于Pouyansoft.SellEngineering.MVVM.WPF.Letters.View.SelectLetterTemplateView..ctor(),位于D:\NirooTeamProject\NirootTransteamProject\SellEngineering\Pouyansoft.SellEngineering.MVVM.WPF.Letters\View\SelectLetterTemplateView.xaml.cs:第23行


有趣的是,如果我只是在
code-Behind
中的某个地方创建了上述对象的一个实例,它就能正常工作。

您能发布用于{StaticResource}和XAML导入的XAML吗?也许你错过了XAML导入?嗨,你有没有找到解决这个问题的方法?我刚刚更新到VS2015,现在发现这个错误。