Mauro,
The Nant task in question here is actually <script>.
The <code> element contains the C# source for a method called
ScriptMain.
What the C# code appears to do is set the program_files
property (presumably accessed elsewhere in the script as ${program_files})
to the user/machine specific Program Files folder (typically C:\Program
Files).
Hope this helps,
Regards,
Richard From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Mauro Ciaccio Sent: Monday, May 09, 2005 10:02 To: nant-users@lists.sourceforge.net Subject: [Nant-users] (no subject) Hi, I’m trying to maintain someone
else’s Nant script and have found the following which I don’t
understand: <target name='init'
description='preps the program_files property'> <script
language="C#">
<code><![CDATA[
public static void ScriptMain(Project project) {
if (project.Properties["program_files"] == null)
project.Properties["program_files"] =
Environment.GetFolderPath(Environment.SpecialFolder.ProgramFiles);
}
]]></code>
</script>
</target> I have looked for <code> under
tasks and functions, but not found anything. I’d appreciate any clarification on
the purpose of the above. Thanks Mauro
Ciaccio ********************************************************** Beacon
Computer Technology Ltd |
- RE: [Nant-users] (no subject) Foster, Richard - PAL
- [Nant-users] (no subject) Richard Griffiths
- Re: [Nant-users] (no subject) Gary Feldman
- [Nant-users] (no subject) Sachin Shriram Gedam
- Re: [Nant-users] (no subject) Merrill Cornish
- [Nant-users] (no subject) Sheikh Nabeel Moeen
- [Nant-users] (no subject) Daniel Czarnecki
- RE: [Nant-users] (no subject) Gert Driesen
- RE: [Nant-users] (no subject) Daniel Czarnecki
- [Nant-users] (no subject) Brad Eck
- [NAnt-users] (no subject) Ahmed, Shabana