.Net classes for Ant

Vision: make ant the definative build tool for .net projects, just as it is becoming for java projects

Detail.

The emergent policy in big java projects is 'IDE for code and debug'; Ant for builds, test and deployment. While IDEs are great for an individual development task, Ant not only rebuilds everything insanely fast, it has great support for modern deployment tasks -ftp upload, EJB servers, SQL commands, all can be done from a relatively simple XML declaration of what you want done. Also in a large project (especially open source) there is no means of dictating which IDE to use. Ant gives IDE independence, cross platform portability and ease of extensibility.

Projects using .net should be able to use the same tool. This will avoid everyone being dependent on Visual Studio.net (if they have it) supplemented with makefiles and batch files. Anyone doing mixed java/dotnet development will be particulary grateful, as they can have a unified build process.

If at sometime in the future bits of .net do appear on different platforms then ant based build files will migrate -once the ant tasks have been migrated and any hard codings of DOS-descendant file system conventions removed from the build.xml files

Key .net Tasks

  1. csc - csharp compiler - *.csc -> output
  2. ilasm - IL assembler - *.il ->.exe or .dll
  3. ResX - ResXToResources.exe .resx -> .resources
  4. al - assembly linker (.dll) ->
  5. Signcode - .exe + keys -> .exe'
  6. Resgen - .properties -> .resources
  7. Type Library Exporter (TlbExp.exe- .dll -> .tlb
  8. TlbImp.exe Type Library Importer
  9. RegAsm.exe Assembly Registration Tool .dll -> .reg | registration
  10. WebServiceUtil -SOAP proxy import, SDL generation tool

Ant Wrapper for net tasks

Rarely used .net command line tools can be invoked manually. The key tasks to address are the common steps in a build process and those which benefit from the file pattern matching function.

The esoteric tasks can then supported on demand by those who need them. The initial .net tasks should provide a foundation for that demand creation to be simple.

Plan

  1. code up C sharp task and distribute for feedback & identify possible aid
  2. Add the next task I need (whatever that is)
  3. Refactor to produce a base class for .net tasks
  4. Leave it other people write all the other tasks

Risks


Using Ant in .net projects

Setup

To use the net tasks one needs An example build.xml file is included in the test directory.

Task: CSC

This task compiles CSharp source into executables or modules. Consult the javadoc file for parameter details.

Task: ilasm

Task to assemble .il files. Consult the javadoc file for parameter details.