且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

将两个或多个Visual Studio项目合并为一个项目

更新时间:2022-12-10 21:32:57

尝试"ReSharper中的移至文件夹"重构,它将处理名称空间并使用合并所隐含的指令更改.

Try "Move to Folder" refactoring in ReSharper, it will deal with namespace and using directive changes that the merge implies.

  1. 在解决方案资源管理器中,选择要从源项目移动到目标项目的文件.
  2. 选择ReSharper>重构>移动. 这是重构对话框的外观.
  3. 选择目标项目(或其中的文件夹).
  4. 确保选中修复名称空间"并应用重构.
  1. In Solution Explorer, select files that you want to move from your source project to your target project.
  2. Choose ReSharper > Refactor > Move. Here's how the refactoring dialog looks like.
  3. Choose a destination project (or a folder in it).
  4. Make sure to keep "Fix namespaces" selected and apply the refactoring.

如果存在阻止移动的冲突,ReSharper将让您知道它们.否则,重构将立即应用.

If there are conflicts that prevent the move, ReSharper will let you know about them. Otherwise, the refactoring will be applied immediately.

P.S.我在JetBrains工作

P.S. I work at JetBrains