Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

I have a simple ASP.Net MVC project which for some reason has issues with intellisense. It is constantly giving me errors that namespaces local to the project can not be found, even though they do exist and the project will build fine. Here's an example:

enter image description here

It is very frustrating as this results in me having no intellisense available whatsoever. Has any one encountered a problem like this before, and do they know of a solution?

The project itself is an MVC4 website running in VS2013 in W8 under Paralells on a Macbook Air, should that have any effect on the problem.

As stated, I have no error messages to provide as the project builds and runs successfully, but please let me know if more details are required.

like image 623
Rory McCrossan Avatar asked Nov 02 '22 08:11

Rory McCrossan


1 Answers

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.

like image 125
sowee15 Avatar answered Nov 15 '22 06:11

sowee15