大家都需要有关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>
我收到未使用的节点检测到的异常。请尽快帮助我。提前谢谢。
答案 0 :(得分:3)
很难从您的代码示例中看出,但是您是否检查了<Conditionals>
节点是否嵌入在项目声明中的<tasks>...</tasks>
节点中?
换句话说:
<project>
<tasks>
<conditional>...</conditional>
</tasks>
</project>
而不是
<project>
<conditional>...</conditional>
</project>