Mauro Ciaccio wrote:

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.

The <code> type is documented under the <script> task. It might make sense to add more complete documentation under the section on types.

This is just a piece of inline custom code that is getting the location of the ProgramFiles folder and storing it into the NAnt property named program_files.

Gary



-------------------------------------------------------
This SF.Net email is sponsored by: NEC IT Guy Games.
Get your fingers limbered up and give it your best shot. 4 great events, 4
opportunities to win big! Highest score wins.NEC IT Guy Games. Play to
win an NEC 61 plasma display. Visit http://www.necitguy.com/?r=20
_______________________________________________
Nant-users mailing list
Nant-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to