VS2013:查找资源字典时发生错误

And*_*ndy 5 wpf visual-studio-2013

我刚刚获得VS2013并打开了我的VS2010项目.但是现在我看不到任何xaml设计.问题是没有应用样式:

   <UserControl.Resources>
    <ResourceDictionary>
        <ResourceDictionary.MergedDictionaries>
            <ResourceDictionary Source="/Themes/Colors.xaml"/>
        </ResourceDictionary.MergedDictionaries>
    </ResourceDictionary>
Run Code Online (Sandbox Code Playgroud)

给我错误:

错误1查找资源字典"/Themes/Colors.xaml"时发生错误.

这在VS2010中工作正常.构建选项设置为Page.所有目标框架都设置为.NET 4.

目录结构是这样的:

Host\Themes\Colors.xaml    
Plugins\EqPlugin\Source\ProblemFile.xaml
Run Code Online (Sandbox Code Playgroud)

主题在VEParameters项目中定义并声明:

<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                xmlns:local="clr-namespace:EQPlugin;assembly=VEParameterTool">
Run Code Online (Sandbox Code Playgroud)

发生错误的文件位于EqPlugIn目录中并声明:

<UserControl x:Class="EQPlugin.EQControl"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             xmlns:src="clr-namespace:VEParameterTool;assembly=VEParameterTool"             
             xmlns:l="clr-namespace:EQPlugin"  
             xmlns:sys="clr-namespace:System;assembly=mscorlib"
             xmlns:oxy="http://oxyplot.codeplex.com"
             mc:Ignorable="d">
Run Code Online (Sandbox Code Playgroud)

我已经尝试将路径更改为相对路径,但这不起作用,我已删除并重新添加程序集,我已重新启动等,所有项目都是为同一框架构建的.我不知道还有什么可以尝试的.

小智 7

尝试下面的一个,即使它在同一个程序集中,也可以使用程序集名称

Source="pack://application:,,,/<assemblyName>;component/Themes/Colors.xaml" 
Run Code Online (Sandbox Code Playgroud)