AspNetCompiler inside Cruise Control (ccnet) Blocks

AspNetCompiler block made my go crazy in the last two days until i was able to use it with ccnet. I'll show a small sample about how to use AspNetCompiler with ccnet:

in the ccnet.config between task blocks but these lines;

                       <msbuild>
                                <executable>C:\WINDOWS\Microsoft.NET\Framework\v3.5\MSBuild.exe</executable><!--msbuild exe directory -->
                                <workingDirectory>D:\develop\CCnet\myProject\</workingDirectory><!--your working directory -->
                                <projectFile>C:\Program Files\CruiseControl.NET\server\AspNetCompilerConfiguration.xml</projectFile><!--the configuration xml file which will hold  AspNetCompiler  lines-->
                                <logger>C:\Program Files\CruiseControl.NET\server\ThoughtWorks.CruiseControl.MsBuild.dll</logger>
                        </msbuild>

 

now create a new xml file and call it AspNetCompilerConfiguration.xml which will contain the lines below;

<Project
        xmlns = "http://schemas.microsoft.com/developer/msbuild/2003"
        name = "AspNetPreCompile"
        DefaultTargets = "PrecompileWeb">
        <Target Name = "PrecompileWeb">
                <AspNetCompiler
                        VirtualPath = "DeployTemp" <!--this directory will be created in side your framework temp directory -->
                        PhysicalPath = "D:\develop\CCnet\myProject\WebSite"<!--give the path of the project that will be precompiled -->
                        TargetPath = "D:\develop\CCnet\myProject\PreCompiled"<!--your output folder-->
                        Force = "true"
                        Debug = "true"
                        Updateable = "true"/>
        </Target>
</Project>

and that is all !! hope this helps you.

 

4 Comments

Comments have been disabled for this content.