ccnet编译后dll被删除
最近给客户做ccnet配置,在svn服务器上不进行提交bin文件,但是编译后要用其dll进行代码规范检查,可是发现ccnet编译后生成的dll又被删除了,很郁闷,找了好久才发现我的配置是
<msbuild>
<executable>C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.exe</executable>
<workingDirectory>C:\WebSite\Hello\WorkingDirectory</workingDirectory>
<projectFile>Hello.sln</projectFile>
<buildArgs>/t:Rebuild</buildArgs>
<logger>C:\Program Files (x86)\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
<targets>Build</targets>
</msbuild>
这样的话在项目中就会执行build后再执行rebuild,这时rebuild就会把dll删除,当把参数/t:Rebuild去掉只执行build就会保留dll,另外如果保留参数/t:Rebuild那么就要把<targets>Build</targets>中的Build去掉,这样只进行rebuild也会保留dll