Fixing an issue with output parameters that are of type IntPtr
[castle.git] / Experiments / Generator / Generators / NAntScript / NAntScriptGenerator.boo
blob11dda0f8bce4b0719394e3e0f8b0c7a5b4ea1df1
1 import System.Xml from "System.Xml"
3 class NAntScriptGenerator(GeneratorBase):
4 [Property(ProjectFile), Argument('Path to the .csproj file')]
5 _projectFile as string
6 [Property(Project), Argument('Project name')]
7 _project as string
9 [Property(References)] _references as (string)
10 [Property(Sources)] _sources as (string)
12 def Run():
13 doc = XmlDocument()
14 doc.Load(_projectFile)
16 root = "//VisualStudioProject/CSHARP"
18 _references = [node.Attributes['HintPath'].Value for node as XmlElement in doc.SelectNodes("${root}/Build/References/Reference")].ToArray(string)
19 _sources = [node.Attributes['RelPath'].Value for node as XmlElement in doc.SelectNodes("${root}//Files/Include/File")].ToArray(string)
21 Process('default.build', "${Project}.build")
23 def Help():
24 return 'Generates a NAnt build script from a Visual Studio 2005 project file (.csproj)'