2011-07-12 55 views
0

我有以下XAML作爲資源字典,但Visual Studio 2008告訴我它無法找到ResourceDictionary標記。找不到類型'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

對我來說看起來沒問題。

Vs2008在涉及到使用XAML時是有問題的。如果可以的話,儘量升級到2010年。如果你還在使用VS,請確保您有最新的SP

否則,嘗試重新打開,過去也有類似的問題,重新啓動固定它奇蹟般地:)在年底升級到VS2010

+0

非常錯誤確實。我像你一樣重新開始,它暫時解決了問題然後回來。我刪除了我的項目,並從SVN再次檢出它。所有*出現*都能正常工作。謝謝。 – gcso

+0

我知道。如果你有機會和許可,你最好升級到VS2010。造成巨大的差異。不僅適用於XAML,而且適用於所有> 50個解決方案項目 –