Pregunta

Tengo un proyecto .Net 4.0 que desea construir en CruiseControl.Net.

ya está configurado, por lo que construye una publicación-build y funciona perfectamente excepto por el número de versión, donde no puedo hacer referencia a CCNetLabel, que desea utilizar para el último dígito del número de versión.

Cuando yo trato de hacer referencia al campo / variables, según me han dicho que es desconocido.

Parece que CC.Net no lo hace 'transferencia' de los valores a mi guión, pero lo que estoy haciendo mal?

A continuación ccnet.config y producto-ci.config

Gracias por cualquier sugerencia,

Anders, Dinamarca

<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>
¿Fue útil?

Solución

El CCNetLabel se pasa como una propiedad para el archivo de proyecto de MSBuild y disponible en su interior para use.I utilizar de esta manera con un valor por defecto.

<PropertyGroup>
<CCNetLabel Condition="$(CCNetLabel)==''">0.0.0.0</CCNetLabel>
</PropertyGroup>
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top