|
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 |
- Re: [Nant-users] Default Framework property? Hein, Rick
- Re: [Nant-users] Default Framework property? Gert Driesen
