SharePoint / ASP.Net Development
Experiences from the field...
Navigation
   RSS 2.0
Categories
Entries by Month

# Saturday, August 27, 2005

If you are using active generation of templates, here is a build script that invokes CodeSmith:

<?xml version="1.0" encoding="unicode"?>
<project name="nant" default="compile" xmlns="http://nant.sf.net/schemas/nant.xsd">
 <property name="CodeSmith" value="cs.exe" />

 <target name="compile" depends="genruntime" description="Compile entire solution">
  <solution solutionfile="src\project.sln" configuration="release">
   <webmap>
    <map url="http://localhost/ProjectWeb" path="src\ProjectWeb" />
   </webmap>
  </solution>
 </target>
 <target name="genruntime" description="Generate O/R Classes for the runtime library">
  <exec program="${CodeSmith}" basedir="tools\codesmith" workingdir="src\ProjectWeb.Runtime">
   <arg value="/t: Templates\ClassGenerator.cst" />
   <arg value="/ps: ORClasses.xml" />
  </exec>
 </target>

This script was influenced by Mike Roberts' article How to setup a .NET Development Tree. (Thanks Mike!) I use a property to alias the CodeSmith command (cs.exe) because I kept thinking csc (which compiles C# code).

Saturday, August 27, 2005 11:15:59 AM (Central Daylight Time, UTC-05:00)  #    Comments [0]  | 
Comments are closed.
Search

Further Reading...

Powered by: newtelligence dasBlog 2.2.8279.16125

The opinions expressed herein are my own personal opinions and do not represent my employer's view in anyway.

© Copyright 2008, Paul Schaeflein

Send mail to the author(s) E-mail