Search code examples
asp.net-mvcvisual-studio-2010razorrefactoringstrongly-typed-view

Is rename refactoring working for somebody in strongly typed razor views?


I have a model that looks like this:

public class Person
{
     public string PostalCode {get;set;}
}

Then I have a razor view

@model MvcApp1.Person

Your location is: @Model.PostalCode

When I am using Visual Studio's 2010 rename refactoring (Ctrl+R,R) the property gets renamed on the model class, but stays the same in the view.

My understanding is that since the view is strongly typed, renaming should have also happened in the view.

What am I doing wrong?


Solution

  • VS's refactoring engine doesn't support Razor.