[英]Extracting a project as a separate project from the Visual Studio solution
I'm using Visual Studio 2013 and I have a solution that contains multiple projects.我正在使用 Visual Studio 2013 并且我有一个包含多个项目的解决方案。
I would like to extract one project from a solution to create a new, separate solution, that would only contain this one project.我想从解决方案中提取一个项目来创建一个新的、单独的解决方案,该解决方案只包含这个项目。
Does anyone know how to do this?有谁知道如何做到这一点?
If by "Extract", you mean "Duplicate" your project and start a new solution with this project, here is what you can do:如果“提取”是指“复制”您的项目并使用该项目开始一个新的解决方案,那么您可以执行以下操作:
Copy the project folder into separate folder, open the .csproj file, press CTRL + S
, it will open the save dialog and you will save the .sln
file.将项目文件夹复制到单独的文件夹中,打开 .csproj 文件,按
CTRL + S
,它将打开保存对话框,您将保存.sln
文件。 That is it.这就对了。
Right click on any project, then Exclude from Project .右键单击任何项目,然后从项目中排除。 The excluded files will be in the project folder.
排除的文件将位于项目文件夹中。 Move those files to another folder, in the way you want it.
按照您想要的方式将这些文件移动到另一个文件夹。 Then you can create and add those files in new project by Add existing item
然后您可以通过添加现有项目在新项目中创建和添加这些文件
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.