Visual Studio: Is there a “move class to different namespace” refactoring?

前端 未结 9 1562
太阳男子
太阳男子 2020-12-20 12:17

I\'m doing some architectural cleanup that involves moving a bunch of classes into different projects and/or namespaces. Currently I\'m moving the files by hand, building, a

9条回答
  •  一个人的身影
    2020-12-20 12:43

    There are partial solutions for VS 2015 & VS 2017 without Resharper using free extensions.

    One extension which I like today (end of 2017) is the Fix Namespace VS Extension: https://marketplace.visualstudio.com/items?itemName=vs-publisher-599079.FixNamespace#overview

    It analyses the folder structure of your solution and offers namespace refactoring using that. Unfortunately it isn't perfect: It doesn't track dependencies that well, but solved the lion's share of the work for me.

提交回复
热议问题