开发者

NANT, Cruise Control and ASP.net 4.0

Does anyone know of a good resource for basic samples for both a NANT.Build file and a CCNet.Config file entry for nightly build on an ASP.net 4.0 application, having had a good look around online it appears that there's a lot of conjecture on how this开发者_如何学C should be done, but I'm looking for something sustainable.

I have projects that use .Net 2.0, .Net 3.5 and .Net 4.0 that all need to go through Cruise Control with Nant for nightly builds, so each needs to be individually configured, rather than just configuring Cruise Control for .Net 4.0, so am looking for the best practise here.


If you have visual studio installed on your build machine, here is the approach you can take. I used to use NANT and MSBUILD for pretty much everything, however I got tired of hacking it when we upgraded frameworks.

I have doing configuration management with Nant and CC.Net for a while now. In my experience I would not recommed using the Nant MSBuild task, instead the easiest way is creating and task, create a .bat file that the task executes. There are several reasons that would recommend using the command line Visual Studio, for one MSI packages are not easily build with Nant, even if you use contrib. Its just way easier and a lot faster this way.

.bat file with this
---------2.0 ------------- "C:\Program Files\Microsoft Visual Studio 8\Common7\IDE\devenv" C:\YourProject\YourSoultion.sln /Rebuild release

----------3.5-------------- "C:\Program Files\Microsoft Visual Studio 9.0\Common7\IDE\devenv" C:\YourProject\YourSoultion.sln /Rebuild release

similar logic for 4.0

there is plenty of information about ccnet tasks here http://ccnet.sourceforge.net/CCNET/Configuring%20the%20Server.html

ccnet config example

    <tasks>
          <nant>
            <executable>C:\Nant\Nant0.86\bin\nant.exe</executable>
            <baseDirectory>.</baseDirectory>
            <buildFile>C:\NANT_SCRIPTS\build.xml</buildFile>
            <targetList>
              <target>DexWeb</target>
            </targetList>
            <buildTimeoutSeconds>2000</buildTimeoutSeconds>
          </nant>       
 </tasks>
    build.xml
    <target name="DexWeb">
        <exec program="C:\NANT_SCRIPTS\continous\dexbuild.bat" />
      </target> 
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜