Submitting again after joining nant users.

Nick

From: "Nicholas Duane" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED], nant-users@lists.sourceforge.net
Subject: RE: solution task: debug,release / build,rebuild,clean
Date: Tue, 05 Sep 2006 21:08:49 -0400

It just dawned on me that this won't work because you can specify multiple targets to nant. I'm still interested in how best to solve the configuration issue.

Nick

From: "Nicholas Duane" <[EMAIL PROTECTED]>
To: nant-users@lists.sourceforge.net
CC: [EMAIL PROTECTED]
Subject: solution task: debug,release / build,rebuild,clean
Date: Tue, 05 Sep 2006 15:14:45 -0400

I see that others have asked for an operation value to the solution task so that you can build, rebuild, or clean. The example given was:

<target name="clean">
  <solution solutionfile="mySolution.sln" op="clean">
</target>

<target name="rebuild">
  <solution solutionfile="mySolution.sln" op="rebuild">
</target>

<target name="build">
  <solution solutionfile="mySolution.sln" op="build">
</target>

What jumps out immediately to me is:

<target name="${target::get-current-target()}">
<solution solutionfile="mySolution.sln" op="${target::get-current-target()}"/>
</target>

Of course I'm guessing you can't call get-current-target() until you're in that target so it won't work for the <target> element. It would be nice if we could get the target to build from a project level object.

Specifying debug and release also seem a bit difficult. My script looks like this:

<?xml version="1.0"?>
<project name="Utils" default="build" basedir=".">
        <description>Utils library</description>
        <property name="debug" value="True" overwrite="false" />

        <target name="build" description="builds Utils">
           <if test="${debug=='True'}">
                   <solution configuration="Debug">
                           <projects>
                                   <include name="Utils.vcproj"/>
                           </projects>
                   </solution>
           </if>
           <if test="${debug!='True'}">
                   <solution configuration="Debug">
                           <projects>
                                   <include name="Utils.vcproj"/>
                           </projects>
                   </solution>
           </if>
        </target>
</project>

I'm guessing people have come up with a better solution than this Do people use an <if> task to set a 'configuration' property before building the targets?

Thanks,
Nick

_________________________________________________________________
Get the new Windows Live Messenger! http://imagine-msn.com/messenger/launch80/default.aspx?locale=en-us&source=wlmailtagline


_________________________________________________________________
Windows Live Spaces is here! It’s easy to create your own personal Web site. http://spaces.live.com/signup.aspx


_________________________________________________________________
Windows Live Spaces is here! It’s easy to create your own personal Web site. http://spaces.live.com/signup.aspx


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
NAnt-users mailing list
NAnt-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nant-users

Reply via email to