Hi guys,
First of all - THANK YOU for the great tool!
I'm using 20040118 build version (I believe it is 0.85)
We got tons of projects and I want to create properties with all project
names.
Unfortunately there is no list element, so I want to load projects from
xml file.
The result should look like this:
<property name="project.A.file" value="A"/>
<property name="project.A.pvcs.dir" value="PVCS:\archive\A"
<property name="project.A.type" value="web" />
<property name="project.B.file" value="B" />
There are going to be 20 of these lines :-(
Anyway, I decided to learn how I can write tasks using your examples and
I came up with this code:
4><TaskName("LoadProjects")> _
5> Public Class LoadProjects
6> Inherits Task
7>
8> Protected Overrides Sub ExecuteTask()
9> For Each Item As System.Collections.DictionaryEntry In
Project.Properties
10> Log(Level.Info, LogPrefix + Item.Key.ToString + "=" +
Item.Value.ToString)
11> Next
12> End Sub
13>End Class
This task supposes to display all properties.
Here is the result:
NAnt 0.85 (Build 0.85.1447.0; net-1.0.win32; nightly; 12/18/2003)
Copyright (C) 2001-2004 Gerry Shaw
http://nant.sourceforge.net <http://nant.sourceforge.net/>
Buildfile: file:///C:/DEV03/dotNET/Build.Tools/Source/setup.xml
Target(s) specified: setup
[loadtasks] Loading tasks from assembly
'C:\DEV03\dotNET\Build.Tools\bin\CustomTasks.dll'.
setup:
[EchoCap] OPS
[LoadProjects] nant.tasks.servicecontroller=True
[LoadProjects] nant.tasks.xmlpoke=True
[LoadProjects] nant.version=0.85.1447.0
[LoadProjects] startup.project=unknown
[LoadProjects] nant.tasks.unzip.location=c:\program
files\nant\bin\nant.ziptasks.dll
[LoadProjects] nant.tasks.al=True
[LoadProjects]
nant.project.buildfile=file:///C:/DEV03/dotNET/Build.Tools/Source/setup
-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
nant-developers mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-developers