添加自定义 xmlns 后 Xaml 智能感知不起作用 [英] Xaml intellisense not working after adding custom xmlns

查看:18
本文介绍了添加自定义 xmlns 后 Xaml 智能感知不起作用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我遇到了以下情况.我有 WPF NET.VS2012+Resharper 中的 4.0 项目,带有一些 xaml 视图和用户控件.项目编译并工作得很好,但没有 XAML 智能感知(或任何其他通知,这是 xaml 文件 - 例如,悬停在声明的控件上后没有工具提示).当我为此项目中声明的命名空间包含 xmlns 值时,这种智能感知总是会中断.例如:

I'm stuck with following situation. I have WPF NET. 4.0 project in VS2012+Resharper with some number of xaml views and user controls. Project compiles and works just fine, but there is no XAML intellisense (or any other notifications that this is xaml file - for example no tooltip after hoovering over declared control). And this intellisense is breaking always when I include xmlns value for namespace declared within this project. For example:

xmlns:converters="clr-namespace:MyProject.Helpers.Conventers"

会破坏所有智能感知.删除此行 - 将使其再次工作.

will break all intellisense. Removing this line - will cause it to work again.

它只适用于同一个项目中的命名空间 - 当我引用外部 dll 并使用它的命名空间时 - 没有问题.

It only applies to namespace within the same project - when i reference external dll and use namespace from it - there is no problem.

有谁知道我是否遗漏了一些明显的东西?

Does anyone know if I'm missing something obvious?

推荐答案

好吧,我想通了...这很容易,但很烦人的错误.在 xmlns 中添加 ;assembly= 后,智能感知再次开始工作.以防其他人将来需要它

Ok, i figured it out... It was easy, but irritating mistake. After adding ;assembly= in the xmlns, intellisense started working again. In case anyone else will need it in future

xmlns:converters="clr-namespace:MyProject.Helpers.Conventers;assembly="

工作正常.

这篇关于添加自定义 xmlns 后 Xaml 智能感知不起作用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆