1

大家好,需要有关 CCNet 条件执行的帮助。

这些是我声明的触发器

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

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

下面是我要根据条件触发的任务

 <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>

我收到未使用的节点检测到的异常。请尽快帮助我。提前致谢。

4

1 回答 1

3

从您的代码示例中很难分辨,但是您是否检查了该<Conditionals>节点是否嵌入<tasks>...</tasks>在您的项目声明中的节点中?换句话说:

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

并不是

<project>
<conditional>...</conditional>
</project>
于 2013-11-05T16:52:41.803 回答