NANT Task for web project deployments

by javajoe 24. June 2010 12:12

When writing continuous integration deployment tasks, one issue I typically run into is “what files do I grab for a particular web project?” If I define a set of file extensions to include with a NANT copy task, then I grab them from the source directory whether they are still part of the csproject file or not. THe following task grabs the dlls of the bin directory plus all files in the csproj file labeled as content. When looking at a csproj file in notepad, the xml that defines a content file changed between vs.net 8 and 9. The xpath expression I use in the attached file is updated for the version 9 project file.

The following is an example of how to use this task. Note that the deploy task is derived from the NANT copy task. Thus, after doing the custom csproj deployment, it also does a copy using the info defined in the fileset child element. This works well if you need to copy additional files for the project that may not be referenced in the csproj file.

 

<deploy todir="${target.dir}" sourcefile="${project.file}" >

<fileset basedir="${path::get-directory-name(project.file)}">

<exclude name="**/exceptionHandlingConfiguration.config" />

<exclude name="**/loggingConfiguration.config" />

<exclude name="**/loggingDistributorConfiguration.config" />

<exclude name="**/obj/**" />

</fileset>

</deploy>

 DeployTask.zip (2.06 kb)

 

 

Tags:

Continuous Integration

Agile Presentations

by javajoe 24. June 2010 12:09

Thought I’d post my Agile Presentations I gave at the Indy .NET Developers’ Association’s c# SIG in May, June, and July 2008.

AgileDesign.zip (92.87 kb)

AgileDevelopment.zip (71.00 kb)

Test-Driven-Design.zip (112.97 kb)

Tags:

Agile | Test Driven Design

Welcome

by Administrator 19. June 2010 15:03

Welcome to my new blog location!

Tags:

About the author

Independent Software Consultant specializing in Microsoft .NET technologies.

Tag cloud

    Month List

    Page List