Continuous Integration & .NET: Part II
by Thomas Beck

Listing Six    

<target name="update_source">
    <cvs-update
        destination=".."
        cvsroot=":pserver:anonymous@localhost:/testing"
        password="anonymous"
        module="5-CVS" />
</target>

Listing Seven

<target name="cop" depends="test">
      <exec program="${fxcop.exe}" commandline="/f:${fxcop.src} 
        /o:${fxcop.out} /s" failonerror="false"/> 
</target>


Listing Eight

<mergeFiles>
<file>c:\NETArticle\07FxCop\cs_build\BusObjTstCS.dll-   
     results.xml</file>
     <file>c:\NETArticle\07FxCop\cs_build\BusObjCS.ccnet-
        fxcop.xml</file>
</mergeFiles>

Listing Nine

<target name="clover" depends="database">
  <mkdir dir="${clover.dir}"/>
  <copy file="c:\Program Files\ByteFX\ByteFX .Data 
        Provider 0.75\ByteFX.Data.dll" 
        tofile="${build.dir}\ByteFX.Data.dll" />
  <exec program="c:\program files\cenqua\clover.net\CloverInstr.exe" 
commandline="src\BusObjCS.cs -d ${clover.dir} -i ${clover.dir}\BusObjCS.cdb"/>
  <copy file="c:\program files\cenqua\clover.net\Clover.dll"tofile=
        "${clover.dir}\Clover.dll"/>
  <copy file="c:\program files\cenqua\clover.net\CloverRuntime.dll"
        tofile="${clover.dir}\CloverRuntime.dll"/> 
  <csc target="library" output="${clover.dir}\${basename}.dll"
    imports="System,System.Data,System.Data.SQLClient,
        System.Collections.Specialized,System.XML">
      <sources>
          <includes name="${clover.dir}\BusObjCS.cs"/>
      </sources>
      <references>
          <includes asis="true" name="System.dll"/>
          <includes asis="true" name="System.Data.dll"/>
          <includes asis="true" name="System.XML.dll"/>
    <includes name="${build.dir}\ByteFX.Data.dll"/>
          <includes name="${clover.dir}\Clover.dll"/>
          <includes name="${clover.dir}\CloverRuntime.dll"/>
      </references>
    </csc>
    <copy file="${nunit.dll}" tofile="${clover.dir}\nunit.framework.dll"/>
    <csc target="library" output="${clover.dir}\BusObjTstCS.dll"
        imports="System,System.Data,System.XML,BusObjCS,
        nunit.framework">
        <sources>
            <includes name="src\BusObjTstCS.cs"/>
        </sources>
        <references>
             <includes asis="true" name="System.dll"/>
             <includes asis="true" name="System.Data.dll"/>
             <includes asis="true" name="System.XML.dll"/>
             <includes name="${clover.dir}\Clover.dll"/>
             <includes name="${clover.dir}\BusObjCS.dll"/>
             <includes name="${clover.dir}\nunit.framework.dll"/>
         </references>
     </csc>
     <nunit2>
          <formatter type="Plain" />
          <test assemblyname="${clover.dir}\${testname}.dll"/>
    </nunit2>
    <exec program="c:\program files\cenqua\clover.net\
        HtmlReporter.exe" commandline="-i ${clover.dir}
        \BusObjCS.cdb -o report -t Test"/>
</target>






1


