#28 Guid task

open
nobody
None
5
2006-06-30
2006-06-30
David Keaveny
No

This task generates a new GUID, typically for use with
the <msi> task or the <a
href="http://wix.sourceforge.net">WiX Toolkit</a>.

The syntax is very simple :

<guid prefix="mynew" />

The resulting GUID will be stored in a property mynew.guid.

You can achieve the same with the following NAnt task:

<script language="C#">
<code><![CDATA[
public static void ScriptMain(Project project) {
project.Properties["mynew.guid"] =
Guid.NewGuid().ToString().ToUpper();
}
]]></code>
</script>

This just saves a lot of repetitive code.

Discussion

  • David Keaveny
    David Keaveny
    2006-06-30

    Single .cs source file for Guid task

     
    Attachments