找不到类型'ResourceDictionary'?

时间:2011-07-12 15:21:20

标签: wpf xaml

我将以下XAML作为资源字典,但Visual Studio 2008告诉我它无法找到ResourceDictionary标记。

<ResourceDictionary 
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" 
    xmlns:Views="clr-namespace:Locate.Client.Views" 
    xmlns:Presentation="clr-namespace:Locate.Client.Presentation;assembly=Locate.Client.Presentation">

特定错误消息为Error 1 The type 'ResourceDictionary' was not found. Verify that you are not missing an assembly reference and that all referenced assemblies have been built. C:\dev\Locate\src\Locate.Client\Views\..\Resources\MainWindowResourceDictionary.xaml 1 2 Miscellaneous Files

为什么找不到这个标签的原因?

1 个答案:

答案 0 :(得分:1)

对我来说没问题。

Vs2008在使用XAML时遇到了问题。如果可以,尝试升级到2010。如果你还在使用VS,请确保你有最新的SP

否则,尝试重新打开,过去有类似的问题,重新启动奇迹般的修复:)最后升级到VS2010