2010-12-08 5 views
0

私はCruiseControl.Netでビルドしたい.Net 4.0プロジェクトを持っています。自分のビルドスクリプトでCruiseControl.Netフィールドを使用できないのはなぜですか?

これはセットアップされているので、パブリッシュビルドを構築し、バージョン番号の最後の桁に使用したいCCNetLabelを参照できないバージョン番号を除いて完全に機能します。

フィールド/変数を参照しようとすると、不明であると言われます。

CC.Netはスクリプトの値を「転送」しないようですが、何が間違っていますか?

ccnet.configおよび製品ci.config以下

任意の提案のための

おかげで、

アンダース、デンマーク

<cruisecontrol xmlns:cb="urn:ccnet.config.builder"> 
    <cb:include 
     href="configs/product-ci.config" 
     xmlns:cb="urn:ccnet.config.builder"/> 
</cruisecontrol> 

<cb:scope xmlns:cb="urn:ccnet.config.builder" 
    CCNetWebServer="dkapp04" 
    TriggerInterval="10" 
    WorkingDir="d:\ccnet.output\product" 
    msBuildTargets="Publish" 
    excludedNunitCategories="" 
    publishUrl="http://dkapp04/product/Dev/" 
    destinationFolder="d:\ccnet.output\product\Dev" 
    version ="1.0.0.${CCNetLabel}" 
> 
    <project 
    name="product" 
    webURL="http://$(CCNetWebServer)/ccnet/server/local/project/product-ci/ViewLatestBuildReport.aspx" 
    queue="default"> 

    <state type="state" directory="C:\Program Files\CruiseControl.NET\server\States\" /> 

    <triggers> 
     <intervalTrigger seconds="$(TriggerInterval)" /> 
    </triggers> 

    <sourcecontrol type="svn"> 
     <trunkUrl>https://dkapp04.company.com/svn/product/trunk</trunkUrl> 
     <workingDirectory>$(WorkingDir)</workingDirectory> 
     <cleanCopy>false</cleanCopy> 
     <executable>C:\Program Files\VisualSVN Server\bin\svn.exe</executable> 
    </sourcecontrol> 

    <tasks> 
     <msbuild 
     executable = "C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe" 
     workingDirectory = "$(WorkingDir)\src" 
     projectFile="BuildScript.proj" 
     buildArgs = "/p:Configuration=Debug /p:excludedNunitCategories=$(excludedNunitCategories) /p:DestinationFolder=$(destinationFolder) /p:PublishUrl=$(publishUrl) /p:ApplicationVersion=$(version)" 
     targets = "$(msBuildTargets)" 
     timeout = "100" 
     logger = "C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll" 
      /> 
    </tasks> 
    </project> 
</cb:scope> 

答えて

0

CCNetLabelは、MSBuildのプロジェクトファイルにプロパティとして渡され、使用のために内部で利用できます。私はこれをデフォルト値で使用します。

<PropertyGroup> 
<CCNetLabel Condition="$(CCNetLabel)==''">0.0.0.0</CCNetLabel> 
</PropertyGroup> 
+0

こんにちはプラティック、時間を割いてくれてありがとう。 私はもう少し助けが必要です。 私は今、魅力のように動作するsvnRevisionLabellerをダウンロードしました。私が目指すリビジョンを手に入れます。公開されたバージョンは、ソースファイルに書かれている(そしてVSに表示されている)1.0.0.3のままです。 どうすればmsbuildの最後のステップに入りますか?私はフィットするパラメータを見つけることができないようです... –

+0

私の解決策は次のとおりです - 私はラインのバージョンパラメータを持っていませんでした。助けのための おかげで、 アンダース は<ターゲット名= "公開">

関連する問題