Sorry if this is obvious, but it is very confusing for me. After specifying model type:
@model MyNamespace.MyModel
Which does not display any error and the path to the MyModel
is correct, same is the model name, some of the methods seem not to recognize the Model
type as follows:
@Html.Partial("_Title", Model)
Which outputs the following error:
extension methods cannot be dynamically dispatched
Which should not be shown, since the Model
type is specified. Also if I am trying to cast it again:
@Html.Partial("_Title", (MyNamespace.MyModel)Model)
Resharper is saying that Cast is redundant, but the error goes away.
What could cause this behavior to an MVC view?
Note: I have other views which have the model defined in the very same way and which are using exactly same partial views, but they are working properly.
I have tried deleting the file and recreating and the errors keep coming back.