续接上一篇的
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的工作,敬请关注,谢谢您。