Is there a fairly simple way to get a project's version?  Example, I want to get the 
value of the project.version property in the NAnt.build file.

This is the code that I have currently, but it doesn't recognize project.version as an 
object.


<script language="C#">
<code><![CDATA[
public static void ScriptMain(Project project) {
   string nantPath = Path.Combine(project.BaseDirectory, 
project.Properties["nant.dir"]);
   string nantBuildFile = Path.Combine(nantPath, "NAnt.build");
   Project nantProject = new Project(nantBuildFile, false);
   
   Console.WriteLine(nantProject.Properties["project.version"].ToString());
}
]]></code>
</script>


-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to