我在一个共享项目中有一个值转换器,被我的WinRT应用程序所使用。也就是说,这个转换器位于另一个项目/程序集中,而不是直接使用它的项目里。我已经将另一个项目的命名空间添加到了我的XAML中,而且IDE没有将其标记为未解决:
<UserControl xmlns:CommonConverters="using:Common_WinStore.Converters">
我还为它添加了一个资源条目:
<UserControl.Resources>
<CommonConverters:DebugBindingConverter x:Key="DebugBindingConverter"/>
</UserControl.Resources>
然而,IDE编辑器报错了CommonConverters:DebugBindingConverter。
The name DebugBindingConverter does not exist in the namespace "using:Common_WinStore.Converters"
这真的很恼人,因为当我输入CommonConverters:时,智能感知会在列表中弹出DebugBindingConverter,我使用它来自动完成资源引用。
为什么智能感知可以找到它,但IDE编辑器或编译器却找不到呢?