deployment - How to precompile ASP.NET web application from TeamCity? -


i have question precompiling asp.net web application projects teamcity. sort of follow-up question following thread:

how deploy after build teamcity?

i'm done implementing ci unit testing autodeploy using above thread , i'd complement process precompiling project. project rather large , want avoid unnecessary delays in response time after new deploy.

so, there way teamcity? calling msbuild specific arguments?

sure, can done custom msbuild script. here's 1 run precompile our asp.net mvc 3 website (not varies asp.net version).

first runs regular build running msbuild against solution file, runs custom msbuild code:

<?xml version="1.0" encoding="utf-8"?> <project toolsversion="4.0" defaulttargets="build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">    <import project="$(msbuildtoolspath)\microsoft.csharp.targets" />   <import project="$(msbuildextensionspath)\msbuildcommunitytasks\msbuild.community.tasks.targets"/>    <propertygroup>     <webproject>web\chatpast.web\chatpast.web.csproj</webproject>     <webprojectfolder>web\chatpast.web</webprojectfolder>     <webpublishfolder>chatpastwebpublish</webpublishfolder>   </propertygroup>    <itemgroup>     <zipfiles include="$(teamcity_build_workingdir)\src\chatpast\$(webpublishfolder)\**\*.*" />   </itemgroup>    <target name="build">       <!-- compilation of projects -->       <msbuild projects="chatpast.sln" properties="configuration=release"/>        <!-- creating web publish folder. -->       <removedir directories="$(webpublishfolder)"/>       <makedir directories="$(webpublishfolder)"/>        <!-- running asp.net publish -->       <msbuild projects="$(webproject)"            targets="resolvereferences;_copywebapplication"            properties="configuration=release;webprojectoutputdir=..\..\$(webpublishfolder);outdir=..\..\$(webpublishfolder)\bin\" />    </target> </project> 

Comments

Popular posts from this blog

c# - how to write client side events functions for the combobox items -

exception - Python, pyPdf OCR error: pyPdf.utils.PdfReadError: EOF marker not found -