更改程序集版本的多个项目 [英] Change assembly version for multiple projects

查看:140
本文介绍了更改程序集版本的多个项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我怎样才能更改文件的AssemblyInfo.cs多个项目的程序集版本。我们大约有75项目在我们的解决方案,我们需要的几乎每个星期都来更改版本。什么是做到这一点的最快方式。

How can I change the assembly version in the file AssemblyInfo.cs for multiple projects. We have around 75 project in our solution and we need to change the version almost every week. What is the fastest way to do this.

推荐答案

我通常创建一个文件,该文件中包含的称为AssemblyVersionInfo.cs在所有项目中的链接的。我把这个文件包含版本属性,从常规的AssemblyInfo.cs文件中删除相同的属性。然后,你可以只在一个文件中更新的版本号,并让所有的项目共享同一号码。

I usually create a file called AssemblyVersionInfo.cs that is included as a link in all projects. I make this file contain the version attributes, and remove the same attributes from the regular AssemblyInfo.cs files. Then you can update version numbers in one file only, and make all the projects share the same number.

要添加的文件为纽带;右键单击Solution Explorer中的项目,选择添加 - >现有的项目...。浏览到该文件,然后单击添加按钮的右边的小箭头,并在下拉菜单中选择添加链接。

To add the file as a link; right click the project in the solution explorer, select "Add" -> "Existing item...". Browse to the file, and then click the little arrow in the right edge of the add button, and select "Add As Link" in the dropdown menu.

这篇关于更改程序集版本的多个项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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