You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

dotnet.html 3.7 KiB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <html>
  2. <head>
  3. <title> .Net classes for Ant
  4. </title>
  5. <body>
  6. <h1>.Net classes for Ant</h1>
  7. Vision: make ant the definative build tool for .net projects, just
  8. as it is becoming for java projects
  9. <p>
  10. <h2>Detail. </h2>
  11. The emergent policy in big java projects is 'IDE for code and debug';
  12. Ant for builds, test and deployment. While IDEs are great for an
  13. individual development task, Ant not only rebuilds everything insanely
  14. fast, it has great support for modern deployment tasks -ftp upload,
  15. EJB servers, SQL commands, all can be done from a relatively simple
  16. XML declaration of what you want done. Also in a large project
  17. (especially open source) there is no means of dictating which IDE to use.
  18. Ant gives IDE independence, cross platform portability and ease of
  19. extensibility.
  20. <p>
  21. Projects using .net should be able to use the same tool. This will
  22. avoid everyone being dependent on Visual Studio.net (if they have it)
  23. supplemented with makefiles and batch files. Anyone doing mixed java/dotnet
  24. development will be particulary grateful, as they can have a unified build
  25. process.
  26. <p>
  27. If at sometime in the future bits of .net do appear on different platforms
  28. then ant based build files will migrate -once the ant tasks have been
  29. migrated and any hard codings of DOS-descendant file system conventions
  30. removed from the build.xml files
  31. <h2>Key .net Tasks</h2>
  32. <ol>
  33. <li>csc - csharp compiler - *.csc -&gt; output
  34. <li>ilasm - IL assembler - *.il -&gt;.exe or .dll
  35. <li>ResX - ResXToResources.exe .resx -&gt; .resources
  36. <li>al - assembly linker (.dll) -&gt;
  37. <li>Signcode - .exe + keys -&gt; .exe'
  38. <li>Resgen - .properties -&gt; .resources
  39. <li>Type Library Exporter (TlbExp.exe- .dll -&gt; .tlb
  40. <li>TlbImp.exe Type Library Importer
  41. <li>RegAsm.exe Assembly Registration Tool .dll -&gt; .reg | registration
  42. <li>WebServiceUtil -SOAP proxy import, SDL generation tool
  43. </ol>
  44. <h2>Ant Wrapper for net tasks</h2>
  45. Rarely used .net command line tools can be invoked manually. The key tasks
  46. to address are the common steps in a build process and those which benefit
  47. from the file pattern matching function.
  48. <p>
  49. The esoteric tasks can then supported on demand by those who need them.
  50. The initial .net tasks should provide a foundation for that demand creation
  51. to be simple.
  52. <h2>Plan</h2>
  53. <ol>
  54. <li>code up C sharp task and distribute for feedback & identify possible
  55. aid
  56. <li>Add the next task I need (whatever that is)
  57. <li>Refactor to produce a base class for .net tasks
  58. <li>Leave it other people write all the other tasks
  59. </ol>
  60. <h2>Risks</h2>
  61. <ul>
  62. <li>
  63. The .net SDK is unstable; the next builds will change the commands, arguments
  64. and behaviours. Probability: 100%. Impact: 2 days.
  65. <li>Portable tasks turn out to be harder than envisaged
  66. (=reworking if/when non Win32 .net build tools appear)
  67. </ul>
  68. <hr>
  69. <h2>Using Ant in .net projects</h2>
  70. <h3>
  71. Setup</h3>
  72. To use the net tasks one needs
  73. <ul>
  74. <li> A win2K box (or any other platform which supports the .net build tools)
  75. <li> JavaVM - Java1.1 or later
  76. <li> Ant downloaded and the environment and path variables set up so
  77. that typing 'ant' invokes ant via a batch file.
  78. <li> An XML parser for ant. The usual distributions include an appropriate
  79. version parser.jar and jaxp.jar.
  80. <li> the .net tasks archive (dotnettasks.jar) included in the
  81. ant\lib directory
  82. <li> The .net sdk installed with the binaries on the path. (Test: type CSC)
  83. <li> A build.xml file to describe the build process
  84. </ul>
  85. An example build.xml file is included in the test directory.
  86. <h2>Task: CSC</h2>
  87. This task compiles CSharp source into executables or modules.
  88. Consult the javadoc file for parameter details.
  89. <h2> Task: ilasm <h2>
  90. Task to assemble .il files.
  91. Consult the javadoc file for parameter details.
  92. </body>
  93. </html>