使用CruiseControl.net进行装配体版本控制 [英] Assembly Versioning using CruiseControl.net

查看:71
本文介绍了使用CruiseControl.net进行装配体版本控制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我为我的一些相关项目设置了CruiseControl.net. 结果,CruiseControl中的单个项目标签具有多个SVN检出,然后一堆msbuild任务编译了所有单独的sln文件.

I have setup CruiseControl.net for a bunch of my projects which are related. As a result a single project tag in CruiseControl has multiple SVN checkouts and then a bunch of msbuild tasks compile all the individual sln files.

完成此构建后,我需要更新所有解决方案的程序集版本. 但是,由于我不使用nant也不使用MSBuild proj文件,因此我不确定如何获得此文件.

I need to update the assembly version of all the solutions when this build is being done. However, since i'm not using nant and not using MSBuild proj files, I am unsure on how to get this.

我想知道我是否缺少明显的东西.我只需要一个解决方案,可以通过在ccnet.config文件中进行适当的更改来实现,而无需更改csproj文件.

I wonder if I'm missing something obvious. I just need a solution which can be implemented by making appropriate changes in the ccnet.config file without requiring me to make changes to csproj files.

谢谢, 安吉

推荐答案

如何在项目中使用共享的AssemblyInfo?

What about using a shared AssemblyInfo across your projects?

这是我们对产品所做的:

This is what we do for our products:

  • 每个项目都有自己的AssemblyInfo.cs-其中包含AssemblyTitle,AssemblyDescription,Guid以及该程序集独有的其他属性.

  • Each project has it's own AssemblyInfo.cs - this contains AssemblyTitle, AssemblyDescription, Guid, and other attributes that are unique to that assembly.

每个项目还有另外两个Assembly Info文件,请注意,这些文件是作为链接而不是直接文件添加的(VS-> Add-> Existing File-> Add as链接(添加旁边的小向下箭头) ))

Each project also has two other Assembly Info files, note that these are added as a link rather than a direct file (VS -> Add -> Existing File -> Add as link (little down arrow next to add))

两个链接文件:

  1. CompanyAssemblyInfo.cs-AssemblyCompany,AssemblyCopyright,AssemblyConfiguration,CLSCompliant,SecurityPermission等.基本上,我们想要在所有程序集中实现标准的一切.

  1. CompanyAssemblyInfo.cs - AssemblyCompany, AssemblyCopyright, AssemblyConfiguration, CLSCompliant, SecurityPermission, etc. Basically everything we want standard on all our assemblies.

ProductAssemblyInfo.cs-AssemblyProduct,AssemblyVersion,AssemblyFileVersion.这使我们可以将同一版本从一个文件推送到所有程序集.

ProductAssemblyInfo.cs - AssemblyProduct, AssemblyVersion, AssemblyFileVersion. This allows us to push the same version across to all assemblies from the one file.

我们的CI和发布过程更加复杂,但这是它的核心-一个控制产品版本(组件,安装程序,所有内容!)的单一点(文件)

Our CI and release process is more complicated, but that's at the heart of it - a single point (file) which controls the product version (assemblies, installers, everything!)

这篇关于使用CruiseControl.net进行装配体版本控制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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