如何将项目移动到Visual Studio中的不同文件夹?在我的项目中,我习惯了这种结构。
-- app
---- Project.Something
---- Project.SomethingElse
我想将整个命名空间SomethingElse重命名为SomethingNew,最好的方法是什么(无需手动进入.sln文件)?
如何将项目移动到Visual Studio中的不同文件夹?在我的项目中,我习惯了这种结构。
-- app
---- Project.Something
---- Project.SomethingElse
我想将整个命名空间SomethingElse重命名为SomethingNew,最好的方法是什么(无需手动进入.sln文件)?
当前回答
我尝试了删除和重新添加项目的建议,但修复依赖关系可能会很痛苦。
我使用这种方法:
移动项目文件夹。 如果项目在源代码控制中,则使用源代码控制命令执行移动。 在文本编辑器中编辑解决方案文件。你应该只需要改变一条路径。
其他回答
通过在“解决方案资源管理器”窗口中右键单击项目并选择“删除”,可以从解决方案中删除项目。移动整个项目文件夹,包括您想要移动的子目录。将项目添加回解决方案。
命名空间名称则完全不同,只需编辑源代码即可。
我尝试了删除和重新添加项目的建议,但修复依赖关系可能会很痛苦。
我使用这种方法:
移动项目文件夹。 如果项目在源代码控制中,则使用源代码控制命令执行移动。 在文本编辑器中编辑解决方案文件。你应该只需要改变一条路径。
在visual studio community 2019中,我做了Victor David Francisco Enrique说的,但只需要删除.vs invisible文件夹
对我有效的方法是:
从解决方案中删除项目。 使用文本编辑器编辑项目文件。 更新“包”的所有相对路径。就我而言,我不得不改变。\包裹到..\..\包,因为我把项目移动到一个更深的文件夹。 将项目加载回解决方案中。
This worked for me vb2019. I copied my source project folder. I then pasted the project, and renamed the the folder to whatever. In order to break the ties back to the source project folder, I temporarily renamed the source folder. I opened my destination project. The paths to the forms and modules were re-discovered in the local folder. I went through all my forms and modules to make sure they were working. I ran the project. I closed the project. I renamed the source project folder back to is't original name. I can open both projects at the same time without errors.