Namespace not found within the same project according to intellisense, yet project builds

旧巷老猫 提交于 2019-12-05 09:07:19

I had the same issue. Try removing your project from the solution and then add it again. It worked for me. Looks like a solution file quirk.

UPDATE: this is not a permanent fix as closing and reopening visual studio brings back the issue.

UPDATE 2: while looking to fix another issue where I couldn't change the default namespace of a project (I would get a System.Runtime.InteropServices.ExternalException), I found out that it was related to Xamarin tools for Visual Studio. I proceeded to completely uninstall Xamarin. It fixed my namespace renaming issue as well as the weird type or namespace not found / intellisense issue.

I had this same issue, seems to be something with the solution file and building the project as I could replicate the problem by simply creating a new project building then restarting visual studio.

Anyway I get around it at the moment by deleting the solution file and opening the project using the project file.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!