What's the best way to do a bulk namespace rename on a large c# application?

后端 未结 7 1191
旧时难觅i
旧时难觅i 2020-12-15 15:41

First, a little background.

Currently namespaces and assemblies in our codebase (~60 assemblies, thousands of classes) looks like

WidgetCompany.Depar         


        
7条回答
  •  清歌不尽
    2020-12-15 15:45

    If you have ReSharper:

    1. Right click project, Properties. Change Default namespace to desired namespace.

    2. Right click project, Refactor -> Adjust Namespace to update all the namespaces to use the default namespace

    Then just let it do its magic.

提交回复
热议问题