2012-06-06 31 views
0

我收到此錯誤以下爲低於惡性腳本可以有人幫助:(<buildfiles>不支持嵌套的構建元素「引用」

錯誤是:不支持嵌套的構建元素「引用」 。

請找到下面的代碼:

<?xml version="1.0"?> 
<project name="NAnt Examples" default="build"> 
    <target name="*"> 
     <nant target="${target::get-current-target()}"> 
      <buildfiles> 
       <include name="**/*.build" /> 
       <references> 
       <include name="C:/Program Files/NAnt/examples/Microsoft.Practices.EnterpriseLibrary.Common.dll" /> 
       </references> 
       <!-- avoid recursive execution of current build file --> 
       <exclude name="${project::get-buildfile-path()}" /> 

       <exclude name="ScriptTask/script-sample.build" /> 
       <exclude name="Solution/**/*.build"/> 
      </buildfiles> 
     </nant> 
    </target> 
</project> 

回答

0

您收到此錯誤,因爲<buildfiles>元素,這是一個通常<fileset>不支持<references>作爲其子元素。有關更多詳細信息,請參閱<nant>任務的說明。

+0

我是否必須使用或者 user1383839

+0

你必須使用''的''裏面,因爲它是由''任務語法定義,但''元素的類型是'fileset',因此您應該並且必須使用文件集內容的任何選項:http://nant.sourceforge.net/release/latest/help/types/fileset.html。把它當作通常的''來處理,但命名不同。 –

+0

我將使用,但是如何在nant腳本中提及引用? – user1383839