views:

110

answers:

2

Does anyone have an example nant build file to build an MVC2 project? I'm not sure whether you can use msbuild or whether you have to use aspnet_compiler or if nant will just handle it.

Thanks

A: 

Have you looked at this blog post?:

http://unethicalblogger.com/node/224

It was written for MVC1 so you might need to do some tweaking for MVC2.

Bradley Mountford
+1  A: 

Using the msbuild task on your solution file should build all projects in that solution, including MVC projects. Here's a sample from my own build script:

<target name="msbuild_solution">
    <msbuild project="build.sln"  verbosity="minimal">
        <property name="Configuration" value="Release" />
        <arg value="/t:Build" />
        <arg value="/nologo" />
        <arg value="/noconsolelogger" />
        <arg value="/m:2" />
        <arg value="/tv:3.5" />
    </msbuild>
</target>
Peter Lillevold