I have the following csc task: <!-- Compilation Arguments --> <property name="project.name" value="${Namespace}" /> <property name="build.dir" value="${BuildRoot}\${BuildBaseDirectory}\${Configuration}" /> <property name="slingshot.config" value="${Configuration}" /> <property name="output" value="${build.dir}\${Namespace}.dll" /> <property name="debug" value="true" /> <property name="optimize" value="true" /> <property name="unsafe" value="/unsafe-" /> <property name="checked" value="/checked-" /> <property name="define" value="DEBUG;TRACE" /> <property name="doc" value="${build.dir}\${Namespace}.xml" /> <property name="warninglevel" value="4" /> <property name="References" value="${BuildRoot}\References.txt" /> <property name="Framework" value="${framework::get-framework-directory(nant.settings.currentframework)}" /> <!-- Compile Source Code --> <csc doc="${doc}" warninglevel="${warninglevel}" output="${output}" optimize="${optimize}" target="library" debug="${debug}" define="${define}"> <arg value="${unsafe}" /> <arg value="${checked}" /> <sources basedir="${BuildRoot}"> <include name="*.cs" /> </sources> <references> <includesfile name="${References}" unless="${not(file::exists(References))}" /> <include name="${Framework}\System.dll" unless="${file::exists(References)}" /> <include name="${Framework}\System.Data.dll" unless="${file::exists(References)}" /> <include name="${Framework}\System.XML.dll" unless="${file::exists(References)}" /> </references> </csc> Unfortunately, it appears that the unless attribute on the
<includesfile> is not functioning. If I don't have a
References.txt file I get this error:
Build:
BUILD FAILED
D:\EBusiness\ProjectTemplate.build(112,18):
'D:\EBusiness\Attributes\References.txt' list could not be opened.
Could not find file "D:\EBusiness\Attributes\References.txt".
Total time: 0.4 seconds. I'm also have a problem when I do
have the References.txt file:
Build:
BUILD FAILED
D:\EBusiness\ProjectTemplate.build(111,14):
Error creating FileSet.
The given path's format is not supported.
Total time: 0.5 seconds. Here is the contents of the
References.txt file: ${framework::get-framework-directory(nant.settings.currentframework)}\System.dll ${framework::get-framework-directory(nant.settings.currentframework)}\System.Data.dll ${framework::get-framework-directory(nant.settings.currentframework)}\System.XML.dll What am I doing wrong here? Payton Byrd Trane eBusiness QED Team Phone: 931-905-5386 Fax: 931-648-5901 |