Wednesday, 11 October 2017

MVC - Unit Testing - Fix errors - The type or namespace name 'ViewResult' could not be found (are you missing a using directive or an assembly reference?)


Errors
The type 'System.Web.Mvc.ActionResult' is defined in an assembly that is not referenced.

The type 'System.Web.Mvc.Controlleris defined in an assembly that is not referenced.

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

Watch the solution on YouTube:


To fix it add the following reference: System.Web.Mvc and the following using: System.Web.Mvc


No comments:

Post a Comment