Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
725 views
in Technique[技术] by (71.8m points)

visual-studio - Visual Studio将项目移到其他文件夹(Visual Studio move project to a different folder)

How do I move a project to a different folder in Visual Studio?

(如何将项目移动到Visual Studio中的其他文件夹?)

I am used to this structure in my projects.

(我在项目中习惯了这种结构。)

-- app
---- Project.Something
---- Project.SomethingElse

I want to rename the whole namespace SomethingElse to SomethingNew, what's the best way to do that (without manually going into .sln file)?

(我想将整个命名空间SomethingElse重命名为SomethingNew,这样做的最佳方法是什么(无需手动进入.sln文件)?)

  ask by Egor Pavlikhin translate from so

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I tried the suggestion to remove and re-add the project, but then fixing up dependencies can be a pain.

(我尝试了删除并重新添加项目的建议,但是修复依赖项可能很麻烦。)

I use this approach:

(我使用这种方法:)

  1. Move the project folder.

    (移动项目文件夹。)

    • If the project is in source control, do the move using source control commands.

      (如果项目在源代码管理中,请使用源代码管理命令进行移动。)

  2. Edit the solution file in a text editor.

    (在文本编辑器中编辑解决方案文件。)

    There should be only one path that you need to change.

    (您只需更改一条路径。)


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...