ASP.NET website Continuous Integration+Deployment using CruiseControl.NET, Subversion, MSBuild and Robocopy
Refer to
Omar's Blog
Weksss, cool right?
imagine that your client , demands to see the website that you have made so far, on their network or internet, do you call project support and always build and deploy there?
well it's time for the automatically one, using cruise control we can execute msbuild on the sln, check for changes in subversion and if there is build and deploy to IIS +
Email to the developers and QA
:D
i love this omar guy
15/10/2008
hmm, i've got to make some changes on omar Configuration, since what i intended to do is precompiled it, and copy it to the virtual directory automatically.
i encountered some problems with msbuild . which msbuild will see the right compiler for visual studio, as for web project going to the asp_net compiler.
Now sometimes ASPNET compiler generate error like: can not delete folder , delete manually, it's because the folder is already exists, like this precompiled folder.
i delete it and it's all running. as for command in aspnet_compiler you should add -f to replace if exists(f=forcewrite).
aspnet_compiler -f -p D:\cc\pipeline\code\trunk\pipelinestaging -v /pipeline d:\hasilcompile
But this is msbuild , msbuild just use the -p on regular one , how can we give the -f to aspnetcompiler? ....
well if you see our solution .sln , it's already there..
icrosoft Visual Studio Solution File, Format Version 10.00
# Visual Studio 2008
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "PipeLineStaging", "PipeLineStaging\", "{3B266AA5-9C02-4D38-9E70-3C39B3A4078A}"
ProjectSection(WebsiteProperties) = preProject
TargetFramework = "3.5"
Debug.AspNetCompiler.VirtualPath = "/PipeLineStaging"
Debug.AspNetCompiler.PhysicalPath = "PipeLineStaging\"
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\debug\PipeLineStaging\"
Debug.AspNetCompiler.Updateable = "true"
Debug.AspNetCompiler.ForceOverwrite = "true"
Debug.AspNetCompiler.FixedNames = "true"
Debug.AspNetCompiler.Debug = "True"
Release.AspNetCompiler.VirtualPath = "/PipeLineStaging"
Release.AspNetCompiler.PhysicalPath = "PipeLineStaging\"
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\release\PipeLineStaging\"
Release.AspNetCompiler.Updateable = "true"
Release.AspNetCompiler.ForceOverwrite = "true"
Release.AspNetCompiler.FixedNames = "true"
Release.AspNetCompiler.Debug = "False"
VWDPort = "3024"
EndProjectSection
EndProject
There are some that msbuild can not understand..
and from omars one , he does not turn on iis again, so i add another turn on iis..
and change the path for the precompiled as source and target the virtual directory
<executable>D:\Program Files\Windows Resource Kits\Tools\robocopy.exe</executable>
<baseDirectory>pipeline\</baseDirectory>
<buildArgs>D:\cc\pipeline\code\trunk\PrecompiledWeb\debug\PipeLineStaging C:\Inetpub\wwwroot\Pipeline *.* /E /XA:H /PURGE /XO /XD ".svn" /NDL /NC /NS /NP</buildArgs>
<buildTimeoutSeconds>60</buildTimeoutSeconds>
<successExitCodes>1,0</successExitCodes>
</exec>
<exec>
<executable>iisreset</executable>
<buildArgs>/start</buildArgs>
</exec>
</tasks>