我有一个相当复杂的Visual Studio解决方案(2010年,但这不重要),我需要重命名。

我想重命名文件夹以匹配新的解决方案名称,但我无法找到自动重构文件夹名称的方法,而且查看每个项目文件将是一件痛苦的事情。

有官方的做法吗?


当前回答

连同这个链接的答案

https://stackoverflow.com/a/19844531/6767365

重命名这些文件。 我把我的项目重命名为MvcMovie,它工作得很好

其他回答

连同这个链接的答案

https://stackoverflow.com/a/19844531/6767365

重命名这些文件。 我把我的项目重命名为MvcMovie,它工作得很好

重命名网站:

http://www.c-sharpcorner.com/Blogs/46334/rename-website-project-in-visual-studio-2013.aspx

定位并编辑IISExpress的applicationhost。配置,在这里找到: C: \用户{username} \ \ IISExpress \ config文件

我尝试了Visual Studio Project Renamer,但是,它在我尝试的少数情况下抛出异常。

我在CopyWiz上取得了很大的成功。

我与他们没有任何关系,我还没有为它付钱,但我可能很快就要为它付钱了,因为它似乎是唯一一个对我的c#和c++项目都有效的工具。我确实希望他们能赚点钱,并继续改进它。

使用notepad++的“在文件中查找”功能对我来说很好(ctrl + H,在文件中查找)。

http://notepad-plus-plus.org/download/v6.2.2.html

如果要重命名解决方案,可以执行以下步骤。

Backup.First things first, make sure to always create a backup file.Simply copy your project to a different directory. In Solution Explorer, right-click the project, select Rename, and enter a new name. In Solution Explorer, right-click the project and select Properties. On the Application tab, change the "Assembly name" and "Default namespace". Open any .cs and rename all namespace Change the AssemblyTitle and AssemblyProduct in Properties/AssemblyInfo.cs. Delete bin and obj directories physically. Rename the project physical folder directory. Open the Sln file (within notepad or any editor) and change the path to the project. Cleans and Rebuild the project

https://learn.microsoft.com/en-us/answers/questions/1028483/rename-solution-and-related-projects-in-a-aspnet-w.html细节……