2013-11-05 190 views
5

私はVS2013を取得し、VS2010プロジェクトを開いたばかりです。しかし今、私はxamlデザインのどれも見ることができません。問題は、スタイルが適用されていないです。VS2013:リソースディクショナリの検索中にエラーが発生しました

<UserControl.Resources> 
    <ResourceDictionary> 
     <ResourceDictionary.MergedDictionaries> 
      <ResourceDictionary Source="/Themes/Colors.xaml"/> 
     </ResourceDictionary.MergedDictionaries> 
    </ResourceDictionary> 

は私にエラーを与える:

Error 1 An error occurred while finding the resource dictionary "/Themes/Colors.xaml".

これはVS2010で正常に動作します。ビルドオプションは[ページ]に設定されています。

Host\Themes\Colors.xaml  
Plugins\EqPlugin\Source\ProblemFile.xaml 

テーマは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"> 

ファイルのすべてのターゲット・フレームワークは、ディレクトリ構造がこれです.NET 4.

に設定されていますエラーは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"> 

Iパスを相対パスに変更しようとしましたが動作しません。アセンブリを削除して再追加しました。再起動しました。すべてのプロジェクトが同じフレームワーク用にビルドされています。私は他に何を試していいのかわかりません。

答えて

7

以下のいずれかを試しては、最終的に...それは同じアセンブリ内

Source="pack://application:,,,/<assemblyName>;component/Themes/Colors.xaml" 
+1

場合でも、これが私のために働いた、アセンブリ名をProvied。最初は 'pack:// application:,,,'を追加しても違いはありませんでした。 XAMLデザイナーが最終的にエラーの表示を停止してフォームを表示したコントロールに、結合された辞書のスタイルを適用するまではありませんでした。私のために – Wally

+0

、VS2013では、これは動作しています。 Colors.xamlにエラーがないことを確認してください。 –

関連する問題