0

I'm getting a lot of errors like the following:

The type or namespace name 'ViewResult' could not be found (are you missing a using directive or an assembly reference?)

The thing is when I double-click on one of the errors, it goes to the page, but the error goes away.

However, this happens when I try to run my project. I can't build and run because these errors get thrown, but the errors disappear when I try to double-click on them.

Is there a way to clear the cache for intellisense or somewhere else?

thecodingmate
  • 331
  • 6
  • 16

2 Answers2

1

Right-click the solution in Solution Explorer and choose "Clean Solution".

enter image description here

Can also do this at project level.

Or, close and reload.

CompanyDroneFromSector7G
  • 4,291
  • 13
  • 54
  • 97
0

To add more to CompanyDronFromSector7G answer - I would suggest cleaning asp.net temp folder

C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\Temporary ASP.NET Files\root and/or c:\Users[youruserid]\AppData\Local\Temp\Temporary ASP.NET Files

Ref: ASP.NET Temporary files cleanup

As for "Clean solution" - my advice is to look at the Webapplication bin folder and to double check, whether all have been deleted. From my experience, there are cases when it doesn't work as expected. If needed - delete all from bin folder manually.

Piotr
  • 1,155
  • 12
  • 29
  • The project still gets build errors and does the same thing as stated above. – thecodingmate Aug 01 '17 at 18:15
  • Did you merged some other branch recently (with conflicts?) If so, check whether some duplicated entries was not created in csproj files. Look also in build output as there normally is much more information about the problem (if necessary - change verbosity level) – Piotr Aug 01 '17 at 18:38