同じプロジェクト コードをビルドするために、CruiseControl.Net (バージョン: 1.6.7981.1) サーバーで継続的および夜間の2 つのプロジェクト ビルドを構成しました。
TFS サーバーからコードを取得し、両方のビルドの同じ作業ディレクトリに格納しています。両方のプロジェクト ビルドに assemblyVersionLabeller を適用しました。
連続ビルドは、変更が存在し、夜間ビルド (forcebuild) が午前 5:00 にビルドされる場合にのみビルドされます。
私の問題は次のとおりです。ナイトリー ビルドがビルドを終了するとき、最後のビルド ラベルのリビジョン番号は、連続ビルドのリビジョン番号と同じか、それよりも大きい必要があります。 xxx23884 または 23884 より大きくする必要がありますが、23875 のように小さいです)。
私の ccnet.config は次のようになります。
<cruisecontrol>
<project name="Myproject-Continuous Build">
<triggers>
<intervalTrigger seconds="600" buildCondition="IfModificationExists"/>
</triggers>
<labeller type="assemblyVersionLabeller">
<major>1</major>
<minor>0</minor>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
<sourcecontrol type="vsts" autoGetSource="true">
<server>server path</server>
<username>"username"</username>
<password>password</password>
<project>$Project/Source</project>
<workingDirectory>F:\WD</workingDirectory>
<cleanCopy>false</cleanCopy>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>F:\FD</workingDirectory>
<projectFile>"Project.sln"</projectFile>
<buildArgs>/p:Configuration=Debug /noconsolelogger /v:diag</buildArgs>
<targets>ReBuild</targets>
</msbuild>
</tasks>
</project>
<project name="Myproject-Nightly Build">
<triggers>
<scheduleTrigger time="5:00" buildCondition="ForceBuild"/>
</triggers>
<labeller type="assemblyVersionLabeller">
<major>1</major>
<minor>0</minor>
<incrementOnFailure>false</incrementOnFailure>
</labeller>
<sourcecontrol type="vsts" autoGetSource="true">
<server>server path</server>
<username>"username"</username>
<password>password</password>
<project>$Project/Source</project>
<workingDirectory>F:\WD</workingDirectory>
<cleanCopy>false</cleanCopy>
</sourcecontrol>
<tasks>
<msbuild>
<executable>C:\windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>F:\FD</workingDirectory>
<projectFile>"Project.sln"</projectFile>
<buildArgs>/p:Configuration=Debug /noconsolelogger /v:diag</buildArgs>
<targets>ReBuild</targets>
</msbuild>
</tasks>
</project>
</cruisecontrol>
助けてください ありがとう|GDG