更改解决方案中的所有项目名称,引用,装配名称和名称空间 [英] Change all project name, references , assmebly name and namespaces in a solution

查看:194
本文介绍了更改解决方案中的所有项目名称,引用,装配名称和名称空间的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 

我在VS 2013中有一个解决方案,其中有50多个项目.项目通过一个或多个项目相互链接.参考.我需要在整个解决方案中更改项目的项目名称,程序集名称,名称空间和引用名称. 我知道如何一个接一个地做,但这似乎很耗时.我的项目名称和程序集名称具有模式并与现有名称相关,因此,如果有任何方法可以全局查找替换,那对我来说更有意义.

 

I have a Solution in VS 2013 which has more than 50 projects. Projects are interlinked via one or more project  references.  I am required to change the project name , assembly name, namespace and reference name for projects in entire solution. I know how to do it one by one but that seems very time consuming. My project name and assembly names are in pattern and in correlation with existing names, so if there is any way to global find replace , that would make more sense to me.

有人可以帮助我实现这一目标吗?

Can some one please help me in achieving this goal.

谢谢

Bhim

BSR

推荐答案

有几种方法:

-您可以在解决方案资源管理器中选择所有项目,然后右键单击卸载项目".然后,您需要右键单击编辑<项目>一个接一个(无法选择全部并右键单击编辑").然后,您已经在Visual中打开了所有项目文件 Studio,您可以更改项目名称,程序集名称,引用等.完成后,右键单击重新加载"

- You can select all the projects in the Solution Explorer and right-click Unload Project. Then you need to right-click Edit <Project> one by one (there is no way to select all and right-click Edit). Then you have all the project files opened in Visual Studio and you can change project names, assembly names, references, etc. When done, right-click "Reload"

-您可以使用多文档编辑器(例如Notepad ++)执行相同的操作,该编辑器允许在所有文档编辑器中查找/替换

- You can do the same using a multi-document editor, such as Notepad++, that allows Find/Replace across all them

-如果需要更自动化的工具,则需要使用宏,加载项(在VS 2013上仍然可用)或使用Visual Studio自动化(EnvDTE)的程序包来迭代解决方案,引用等的项目.并进行更改.您有资源 在我的网站上执行此操作:

- If you need something more automated, you need to use a macro, add-in (still available on VS 2013) or package that uses Visual Studio automation (EnvDTE) to iterate the projects of the solution, references, etc. and make changes. You have resources to do this on my website:

http://www.visualstudioextensibility.com/articles/add-ins/

(特别是关于获取信息的文章"部分)

(specially the "Articles about getting information" section)


这篇关于更改解决方案中的所有项目名称,引用,装配名称和名称空间的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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