名称"..."命名空间"clr-namespace"中不存在 [英] The name "..." does not exist in the namespace "clr-namespace"
问题描述
我在使用Visual Studio 2012,.NET 4.5和WPF时遇到了一个奇怪的问题.
I am having a weird problem with Visual Studio 2012, .NET 4.5 and WPF.
视图将找不到对我的任何租户的引用,并且我不断收到错误消息名称"..."在命名空间"clr-namespace"中不存在"
Views wont find references to any of my clases and I keep receiving the error "The name "..." does not exist in the namespace "clr-namespace" "
在智能感知过程中确实找到了我的任何事
while intellisense do find any of my clases
我尝试过的事情:
- xmlns:common ="clr-namespace:IVT.Common.View; assembly = IVT"
- xmlns:common ="clr-namespace:IVT.Common.View; assembly ="
- xmlns:common ="clr-namespace:IVT.Common.View"
- 将我的类移至其他名称空间
- 我重新启动了Visual Studio和计算机
- 更改了.NET版本和编译方法(x86/x64)
- 我创建了新项目,现在他们也有这个问题...但是旧项目仍然有效...
每一次intellisense都会找到类,但是Visual Studio仍然会抛出该错误...
EVERY time intellisense would find classes but visual studio still throws that error...
有什么主意吗?
谢谢.
推荐答案
我在使用VS Studio 2017时遇到了类似的问题
I had similar problem using VS Studio 2017
为了重现该问题,我创建了一个WPF项目.添加了一个用户控件,并在主窗口中引用了该控件.
In order to reproduce the problem I Created a WPF project. Added a user control and referenced the control in the main window.
我遇到的问题是我的解决方案在文件服务器上,而不是在计算机上本地.将其移至本地,一切均按预期工作.不知道这是否是VS Studio中的错误.
The problem I had was that my solution was on a file server and not locally on my computer. Moving it to local everything worked as expected. Not sure if this is a bug in VS Studio or not.
这篇关于名称"..."命名空间"clr-namespace"中不存在的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!