One thing you might want to try is to download the NAntContrib add-on's from
nantcontrib.sou rceforge.net.
There's a task included called "SLiNgshot" (something like that) that will
parse your Solution file and create a <solution name>.build file for you
when you execute the task. I've used this as a kind of jumpstart for
creating a new build script.
<?xml version="1.0"?>
<project name="SlingShot Example" default="build" basedir=".">
<description>Sl ingShot Example</description>
<property name="solutionN ame" value="HelloWor ld" readonly="true"/>
<target name="BuildSolu tion">
<!-- Parse the specified Solution file -->
<!-- Create a Nant build file from that file. -->
<slingshot solution="${sol utionName}.sln" format="nant"
output="${solut ionName}.build" >
<parameters>
<option name="build.bas edir" value="..\bin"/>
</parameters>
</slingshot> -->
<!-- Execute the generated build file. -->
<nant buildfile="${so lutionName}.bui ld"/>
</target>
</project>
This script will create "HelloWorld.bui ld" based on your solution
"HelloWorld.sln ". From there you can examine the generate build script and
alter it as you see fit. If you want to alter the generated script I
recommend removing or commenting out the slingshot task, because the
generated .build file will be overwritten every time the script is executed.
Hope this is helpful!
Michael Hall
mh***@just3ws.c om
Just3Ws, Inc.
"HaukiDog" <Ha******@hotma il.com> wrote in message
news:6d******** *************** ***@posting.goo gle.com...
Hi,
I am trying to set up my C# web project to be compiled by NANT.
Everything compiles and works fine within the IDE. I have a created a
NANT build file which has a simple project tag, like this:
<?xml version="1.0" ?>
<project name="MyProject " default="build" basedir=".">
<description>Th e Hello World of build files.</description>
<property name="debug" value="true"/>
<property name="bin_direc tory" value="bin"/>
<target name="clean" description="re move all generated files">
<delete dir="${bin_dire ctory}" failonerror="tr ue"
verbose="true"/>
</target>
<target name="build" description="co mpiles the source code"
depends="clean" >
<solution configuration=" release">
<projects>
<includes name="MyProject .csproj" />
</projects>
</solution>
</target>
</project>
It gives me some errors on the building of resource files. Some work,
and some don't. I have been able to work around some files by just
deleting whatever info was shown in the resource editor. The error are
stuff like:
c:\MyProject\My Page.aspx.resx
error: Invalid ResX input
I have not changed any of the resource files, they are the ones VS
generates. Does NANT use a different compiler then the IDE, seems so?
Does anyone have any idea what might be wrong.
Thanks!!!
Dave