views:

159

answers:

2

I am attempting to publish a 3.5 MVC website on my build server through cruise control.

Having looked around on the net it appears you need to wrap the ASP Net Compiler. I was hoping that this task can be called through MSBuild.

Any ideas on how this is done?

+1  A: 

This article specifies how to specify a precompiled website. http://msdn.microsoft.com/en-us/library/ms164291.aspx

Remember to also set the tag to 'true' in your MVC csproj file.

Jonathan
A: 

This is fairly simple to accomplish with an MSBUILD file.

Here's a sample target the will rebuild your entire solution and will deploy your MVC web application to your desired output directory

<Target Name="Deploy">
    <MSBuild Projects="Solution.sln" Targets="Rebuild" />

    <MSBuild Projects="MVCWebProject\MVCWeb.csproj"
        Targets="ResolveReferences;_CopyWebApplication"
        Properties="OutDir=$(OutputFolder)\bin\;WebProjectOutputDir=$(OutputFolder)" />
</Target>

In your cc.net configuration, simply pass /p option to the MSBUILD task to specify the output directory for your web application as follows:

/p:OutputFolder=c:\Your\Output\Path

James H