Refactor -> Rename class

When I use the refactor tool to rename a class (aspx.cs), it changes the "CodeFile" attribute in the corresponding aspx page, but not the "Inherits" attribute.


Answer this question

Refactor -> Rename class

  • Charles Trivisonno-10yrsofDelphi

    Jason -

    Where are you invoking the rename from   Fom the editor in your aspx.cs file   Unfortunately, the refactoring tool does not update references in markup -- you should see a warning dialog with this information when you applied your refactoring.  Do you see the "CodeFile" attribute being renamed to the new name of the class   This should should still point to the same aspx.cs file that it referenced earlier.

    Thanks,
    Karen



  • Montana16

    I was invoking the rename from the code behind. Too bad it doesn't modify the aspx file when you rename the class. Thanks for the info.

  • Torsten Pietrek

    Similar problem when you copy n' paste a win form, the "copy of" form class is still the same as the original file. Then renaming it causes both the copied from and the "copy of" class to be renamed causing duplicates!



  • Refactor -> Rename class