Problem with loading resources from referenced assembly in Expression Blend
I have problem with loading resources for UserControl from referenced assembly in Expression Blend
Here is the relevant code:
<UserControl.Resources>
<ResourceDictionary>
<ResourceDictionary.MergedDictionaries>
<ResourceDictionary Source="pack://application:,,,/Referenced.Assembly;component/Resources/ResourceDictionary.xaml"/>
</ResourceDictionary.MergedDictionaries>
</ResourceDictionary>
</UserControl.Resources>
I also tried this URI variant:
<ResourceDic开发者_开发技巧tionary Source="/Referenced.Assembly;Component/Resources/ResourceDictionary.xaml"/>
In Visual Studio 2008 SP1 (both code and designer) everything works fine and application is using specified resources. When loading solution and opening UserControl XAML file in Expression Blend 3, it says "Specified file not found" (or sth like that, I have localized version of .NET Framework) no other information, no exceptions are thrown while debugging Blend process in Visual Studio.
Any ideas?
OK, after some digging I found the problem. I you'll ever have this problem, remember to add this code to your .csproj file:
<ProjectTypeGuids>
{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};
{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
</ProjectTypeGuids>
Even easier solution of this problem is to create new project and choose template WPF Custom Control Library instead of Class Library.
精彩评论