Вопрос

Hi all require help on CCNet Conditional execution.

These are the Triggers I have declared

  <intervalTrigger
           name="continuous"
           seconds="30"
           buildCondition="IfModificationExists"
           initialSeconds="5"/>

  <scheduleTrigger time="23:30" buildCondition="ForceBuild" name="scheduled">
    <weekDays>
      <weekDay>Monday</weekDay>
    </weekDays>
  </scheduleTrigger>
</triggers>

Below is the Task I am Having both to be triggered based on Condition

 <conditional>
  <conditions>
    <compareCondition value1="$[buildCondition]"
      value2="IfModificationExists"  />
  </conditions>
    <tasks>
     <msbuild >
     <executable>...\v4.0.30319\MSBuild.exe</executable>
     <workingDirectory>...\WcfServiceLibrary1\</workingDirectory>
     <projectFile>MSBuild_MasterConfigFile.BUILD</projectFile>
     <buildArgs>/target:CCNETBUILD /p:Config=Debug</buildArgs>
     <timeout>900</timeout>
   </msbuild>

    <elseTasks>
      <msbuild ><executable>...\v4.0.30319\MSBuild.exe</executable>
      <workingDirectory>...\WcfServiceLibrary1\</workingDirectory>
      <projectFile>MSBuild_MasterConfigFile.BUILD</projectFile>
      <buildArgs>/target:CCNETDeploy /p:Config=Debug</buildArgs>
      <timeout>900</timeout>
    </msbuild>
  </elseTasks>
</conditional>

I am getting unused node detected exception. Please help me asap. Thanks in advance.

Это было полезно?

Решение

It is difficult to tell from your code sample, but did you check that the <Conditionals> node is embedded within a <tasks>...</tasks> node in your project declaration? In other words:

<project>
<tasks>
<conditional>...</conditional>
</tasks>
</project>

and not

<project>
<conditional>...</conditional>
</project>
Лицензировано под: CC-BY-SA с атрибуция
Не связан с StackOverflow
scroll top