續接上一篇的http://blog.csdn.net/lu_yongchao/article/details/7164353關於發布程式時設定檔替換的方案,業務是元旦放假心不夠專一,對*.wdproj的改造總也失敗,但看著它裡面的英文說明是應該可以做到的,今晚我先在ccnet.config裡實現設定檔的copy工作,因為ccnet.config裡的tasks裡的task是按自然順序執行的,因此在msbuild
*.wdproj之後執行寫好的設定檔替換的bat即可,參考設定檔如下:
<tasks> <exec executable="E:\單位\testspace\cc.net\CCnetgroup\helloworld\other\CoverSlnFile.bat" /> <msbuild> <executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable> <workingDirectory>E:\單位\testspace\cc.net\CCnetgroup\helloworld\code</workingDirectory> <projectFile>helloworld.sln</projectFile> <buildArgs>/p:Configuration=Debug /v:diag</buildArgs> <timeout>900</timeout> <logger>d:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger> </msbuild> <msbuild> <executable>C:\WINDOWS\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable> <workingDirectory>E:\單位\testspace\cc.net\CCnetgroup\helloworld\helloworld_deploy</workingDirectory> <projectFile>helloworld_deploy.wdproj</projectFile> <buildArgs>/p:Configuration=Debug /v:diag</buildArgs> <timeout>900</timeout> <logger>d:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger> </msbuild> <exec executable="E:\單位\testspace\cc.net\CCnetgroup\helloworld\other\confilecopy.bat" /> </tasks>
明晚學習在cc.net中使用FxCop來實現代碼review的工作,敬請關注,謝謝您。