CruiseControl.NET with a web deployment project
We are currently using a web deployment project to compile the projects in our solution and deploy our website. We'd like t开发者_JAVA技巧o move to using CruiseControl .NET to give us the abilities to automate the builds, add testing, and initiate/review them from a website interface. Currently the web deployment project has project references to all of the projects (70+) and then has a remote DeployPath. This ends up running aspnet_compile and aspnet_merge and dropping the files (assemblies + markup) on our remote server.
I'd like to simulate this behavior with CC but I can't figure out how to do it. I've tried using the wdproj as a target of msbuild (in hopes that it would just build and work) but that seems to fail. I have a hunch I'm going to need a NAnt task or something of the sort to perform the compile/merge steps.
Could someone point me in the right direction?
As far as I know it is not possible to build the standard wdproj deployment projects with msbuild. For a standard deployment project I think you'll need Visual Studio installed.
So I see these options:
1) Visual Studio on build server: Install Visual Studio on the build server, and then execute the build with Visual Studio (devenv.exe).
2) WIX: If you need a web deployment project, and you will not install Visual Studio on the build server, try making a deployment project with Windows Installer XML instead: http://wix.sourceforge.net.
3) Copy website with msbuild: Skip the web deployment project, and use msbuild to either output the website stuff directly on the test server, or to put in a temporary folder which you can then make into a package with the NAnt zip task:
<exec program="msbuild" commandline="MySolution.sln" /> <exec program="msbuild" commandline="MyWebsite\MyWebsite.csproj /t:ResolveReferences;_CopyWebApplication /p:WebProjectOutputDir=\\MyServer\MyWebsite;OutDir=\\MyServer\MyWebsite\" />
The example assumes that you have a web application project in Visual Studio. If you instead have a website project in Visual Studio, the exact steps will be different, but still possible along the same lines.
I ended up using msbuild to run AspNetCompile and AspNetMerge. By just pointing to the correct web folder it found the appropriate dependencies. Thanks for the help guys!
精彩评论