Question

I'm using VS2010, ASP.NET MVC 2, and ReSharper 5.0. When I create a new view that's typed off of a model from the same project as my view, ReSharper doesn't see the reference to the model.

This is the definition of my view:

<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<Web.Domain.UserViewModel>" %>

Domain.UserViewModel is red, and the ReShaper tooltip to add a reference pops up. This is really annoying because I cannot use intellisense for Model and ReSharper shows numerous errors in the view.

This is strictly a ReSharper code-inspection issue. The view actually functions properly if I run the code.

If I change Web.Domain.UserViewModel to an object from another project then the red dissapears and everything is fine. Does anyone know how I can make it recognize the models from the Web project correctly?

Was it helpful?

Solution

Did you try latest bug fix update, ReSharper 5.1?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top