Using an InfoPath document to create a NAnt file
To learn more about InfoPath I attempted to create a document that generates a NAnt build file. I first started by building a schema which only includes a couple of tasks (csc and exec). I then imported it into InfoPath and created the document. This was a repetitive cycle. I had to edit the schema outside of InfoPath and then rebuild the document from it. But eventually I got it to work:
and the end result:
<?xml version="1.0" encoding="UTF-8" ?>
<?mso-infoPathSolution solutionVersion="1.0.0.13"
productVersion="11.0.4920" PIVersion="0.9.0.0"
href="http://www.stronglytyped.com/documents/nantbuildfile.xsn"
language="en-us" ?>
<?mso-application progid="InfoPath.Document"?>
<project name="Hello World Example" default="release"
builddir=".\build"
xmlns:ns1="http://schemas.microsoft.com/office/infopath/2003/myXSD/2003-03-31T23:33:23">
<property name="description" value="test build file"></property>
<target name="release" depends="">
<csc target="exe" output="helloworld.exe" debug="False">
<sources>
<includes name="helloworld.cs"></includes>
<includes name="helloworld_helper.cs"></includes>
</sources>
</csc>
<exec program="helloworld.exe"
commandline="" basedir="."
workingdir="">
</exec>
</target>
</project>
This could be handy but I still ask myself "What is this tool really for?". I guess it could have a million different uses but I want to know what MS is envisioning.

0 Comments:
Post a Comment
<< Home