<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <!-- Documenting T:NAnt.DotNet.Types.NamespaceImportCollection--> <head> <meta http-equiv="Content-Language" content="en-ca" /> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="../style.css" /> <title><namespaceimports> Type</title> </head> <body> <table width="100%" border="0" cellspacing="0" cellpadding="2" class="NavBar"> <tr> <td class="NavBar-Cell"> <a href="http://nant.sourceforge.net"> <b>NAnt</b> </a> <img alt="->" src="../images/arrow.gif" /> <a href="../index.html">Help</a> <img alt="->" src="../images/arrow.gif" /> <a href="../types/index.html">Type Reference</a> <img alt="->" src="../images/arrow.gif" /> <namespaceimports></td> <td class="NavBar-Cell" align="right"> v0.90</td> </tr> </table> <h1><namespaceimports></h1> <p> Contains a collection of <a href="../elements/NAnt.DotNet.Types.NamespaceImport.html">NamespaceImport</a> items. </p> <h3>Parameters</h3> <div class="table"> <table> <tr> <th>Attribute</th> <th style="text-align: center;">Type</th> <th>Description</th> <th style="text-align: center;">Required</th> </tr> <tr> <td valign="top">id</td> <td style="text-align: center;">string</td> <td> The ID used to be referenced later. </td> <td style="text-align: center;">False</td> </tr> <tr> <td valign="top">refid</td> <td style="text-align: center;">string</td> <td> The ID to use as the reference. </td> <td style="text-align: center;">False</td> </tr> </table> </div> <h3>Nested Elements:</h3> <!--Element--> <h4> <a id="import"> </a> <import> </h4> <div class="nested-element"> Adds a <a href="../elements/NAnt.DotNet.Types.NamespaceImport.html">NamespaceImport</a> to the end of the collection. <p> Represents a namespace to import. </p><h3>Parameters</h3><div class="table"><table><tr><th>Attribute</th><th style="text-align: center;">Type</th><th>Description</th><th style="text-align: center;">Required</th></tr><tr><td valign="top">if</td><td style="text-align: center;">bool</td><td> Indicates if the import should be generated. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">name</td><td style="text-align: center;">string</td><td><i>Deprecated.</i> The name of the namespace to import. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">namespace</td><td style="text-align: center;">string</td><td> The name of the namespace to import. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">unless</td><td style="text-align: center;">bool</td><td> Indicates if the import should be not generated. </td><td style="text-align: center;">False</td></tr></table></div><p /></div> <h4> <a id="import"> </a> </import> </h4> <h3>Examples</h3> <ul class="examples"> <li> <p>Define a reference with name "system.imports".</p> <pre class="code"> <namespaceimports id="system.imports"> <import namespace="System" /> <import namespace="System.Data" /> </namespaceimports> </pre> <p>Use the predefined set of imports to compile a VB.NET assembly.</p> <pre class="code"> <vbc target="exe" output="HelloWorld.exe" rootnamespace="HelloWorld"> <imports refid="system.imports" /> <sources> <include name="**/*.vb" /> </sources> <references> <include name="System.dll" /> <include name="System.Data.dll" /> </references> </vbc> </pre> </li> </ul> <h3>Requirements</h3> <div style="margin-left: 20px;"> <b>Assembly:</b> NAnt.DotNetTasks (0.90.3780.0) </div> </body> </html>