Rick,
check this out : http://nant.sourceforge.net/faq.html#change-targetframework
Note : the -k commandline option has since been deprecated, and replaced by
a -t[argetframework] commandline option.
We also might consider deprecating the "nant.settings.currentframework"
property and replacing it with a task ...
Gert
----- Original Message -----
From: "Hein, Rick" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, July 28, 2004 6:24 PM
Subject: [Nant-users] Default Framework property?
Sorry if this is a question that's already been asked, but I've been
unable to find the answer in the archives, and I'm totally new to Nant.
- Is there a way to set the default framework in the build file itself?
Here's my build file
<?xml version="1.0"?>
<project name="Spalding" default="build" basedir=".">
<description>This builds the Spalding WebApplication</description>
<property name="debug" value="true" />
<property name="nant.settings.defaultframework" value="net-1.1" />
<target name="clean" description="Remove all generated files">
<delete file="\bin\WebClaimsProcessing.dll"
failonerror="false" />
<delete file="\bin\WebClaimsProcessing.pdp"
failonerror="false" />
<delete file="\bin\WebClaimsProcessing.resx"
failonerror="false" />
</target>
<target name="WebReferences" description="Compiles the web
references">
<exec program="C:\Program Files\Microsoft Visual Studio .NET
2003\SDK\V1.1\Bin\wsdl.exe" commandline="http://e9040/das/das.asmx
/protocol:SOAP /namespace:DasService /out:DasService.cs" />
</target>
<target name="build" description="Compiles the source code">
<csc target="library" output="WebClaimsProcessing.dll"
debug="${debug}" nowarn="162, 168, 219" >
<sources>
<includes name="*.cs" />
</sources>
<references>
<includes name=".\bin\Moe.Common.WebControls.dll" />
<includes name=".\bin\Moe.DAS.Exception.dll" />
<includes name=".\bin\Moe.DAS.Notify.dll" />
<includes name=".\bin\Moe.DAS.Security.dll" />
</references>
</csc>
<ifnot targetexists="WebClaimsProcessing.dll">
<comparefiles>
<includes name="*.cs" />
</comparefiles>
<echo message="WebClaimsProcessing.dll is newer/same-date
as myfile.cs" />
</ifnot>
</target>
</project>
As you can see in this line
<property name="nant.settings.defaultframework" value="net-1.1" />
I'm setting the default framework, but the docs say it's depreciated,
and in any case, it didn't seem to work - would be nice to not have to
put the
framework target in the command line.
Also - is there a way to have an take an action if the csc task under
the build target fails (or succeeds). What I would like to do is have an
email sent out if the build works. The only way I can see to do it from
the documentation is to look for the existence of the file that the
build would create, but that doesn't seem to work either.
Thanks in advance
Rick
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=4721&alloc_id=10040&op=click
_______________________________________________
Nant-users mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/nant-users