将两个或多个Visual Studio项目合并为一个项目 [英] Merging two or more visual studio project into a one project

查看:1238
本文介绍了将两个或多个Visual Studio项目合并为一个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在研究一个包含大量项目的解决方案.我将通过合并一些项目来重构解决方案.

I am working on a solution that contains bunch of projects. I am going to refactor the solution by merging some of the projects together.

是否有任何工具或Visual Studio扩展可以通过将一个或多个项目合并到项目中来帮助我重构大型解决方案.

Is there any tool or visual studio extension that helps me refactor my large solution by merging one or more projects into on project.

这当然可以手动完成,但我希望有一个更自动化的解决方案!

Of course this can be done manually but I am hoping for a more automated solution!

推荐答案

尝试"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

这篇关于将两个或多个Visual Studio项目合并为一个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆