Should AssemblyInfo.cs be placed in version control?

前端 未结 4 683
耶瑟儿~
耶瑟儿~ 2021-01-31 19:40

I have an automated build system using CruiseControl. I am using the SvnRevisionLabeller to to get the version string to use. With this string I can use nant to update AssemblyI

4条回答
  •  眼角桃花
    2021-01-31 19:43

    Either don't version AssemblyInfo.cs at all, or put "developer version" of them into the repository and have CruiseControl.Net svn-revert them after build (I do the later so that builds made on developers workstations are easily extinguishable from the "official" ones downloaded from CruiseControl.Net).

    As for reproducing the same build labels later - you already have to do the rebuild by calling MSBuild / NAnt by hand, simply pass to it CCNetLabel set to appropriate value and you'll get the same assembly versions generated as with the build invoked from CruiseControl.Net (MSBuild: /p:CCNetLabel=1.4.2.333 , NAnt: -D:CCNetLabel=1.4.2.333).

提交回复
热议问题