Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > c40235f0f9475db9355c37942ddd3d00 > files > 440

nant-0.92-4.mga4.noarch.rpm

<!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.Tasks.CscTask-->
  <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>&lt;csc&gt; Task</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="-&gt;" src="../images/arrow.gif" />
          <a href="../index.html">Help</a>
          <img alt="-&gt;" src="../images/arrow.gif" />
          <a href="../tasks/index.html">Task Reference</a>
          <img alt="-&gt;" src="../images/arrow.gif" /> &lt;csc&gt;</td>
        <td class="NavBar-Cell" align="right">
                        v0.92</td>
      </tr>
    </table>
    <h1>&lt;csc&gt;</h1>
    <p> Compiles C# programs. </p>
    <p class="i2">
      <b>Note:</b>  In order to have <a href="../tasks/csc.html">&lt;csc&gt;</a> task generate manifest resource names that match those generated by Microsoft Visual Studio.NET, the value of the <code>prefix</code> attribute of the &lt;<code>resources</code>&gt; element should match the "Default Namespace" of the C# project, and the value of the <code>dynamicprefix</code> attribute should be set to "<b>true</b>". </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">baseaddress</td>
          <td style="text-align: center;">string</td>
          <td> The preferred base address at which to load a DLL. The default base address for a DLL is set by the .NET Framework common language runtime. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">checked</td>
          <td style="text-align: center;">bool</td>
          <td> Specifies whether an integer arithmetic statement that is not in the scope of the <code>checked</code> or <code>unchecked</code> keywords and that results in a value outside the range of the data type should cause a run-time exception. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">codepage</td>
          <td style="text-align: center;">string</td>
          <td> Specifies the code page to use for all source code files in the compilation. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">debug</td>
          <td style="text-align: center;">
            <a href="../enums/NAnt.DotNet.Types.DebugOutput.html">DebugOutput</a>
          </td>
          <td> Specifies the type of debugging information generated by the compiler. The default is <code>None</code>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">doc</td>
          <td style="text-align: center;">file</td>
          <td> The name of the XML documentation file to generate. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">filealign</td>
          <td style="text-align: center;">int</td>
          <td> Specifies the size of sections in the output file. Valid values are 512, 1024, 2048, 4096, and 8192. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">langversion</td>
          <td style="text-align: center;">string</td>
          <td> Causes the compiler to only accept syntax that is included in a given specification. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">noconfig</td>
          <td style="text-align: center;">bool</td>
          <td> Instructs the compiler not to use implicit references to assemblies. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">nostdlib</td>
          <td style="text-align: center;">bool</td>
          <td> Instructs the compiler not to import mscorlib.dll. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">optimize</td>
          <td style="text-align: center;">bool</td>
          <td> Specifies whether the compiler should perform optimizations to the make output files smaller, faster, and more effecient. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">platform</td>
          <td style="text-align: center;">string</td>
          <td> Specifies which platform version of common language runtime (CLR) can run the output file. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">unsafe</td>
          <td style="text-align: center;">bool</td>
          <td> Instructs the compiler to allow code that uses the <code>unsafe</code> keyword. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">warninglevel</td>
          <td style="text-align: center;">string</td>
          <td> Specifies the warning level for the compiler to display. Valid values are <code>0</code>-<code>4</code>. The default is <code>4</code>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top" class="required">output</td>
          <td style="text-align: center;">file</td>
          <td> The output file created by the compiler. </td>
          <td style="text-align: center;">True</td>
        </tr>
        <tr>
          <td valign="top" class="required">target</td>
          <td style="text-align: center;">string</td>
          <td> Output type. Possible values are <code>exe</code>, <code>winexe</code>, <code>library</code> or <code>module</code>. </td>
          <td style="text-align: center;">True</td>
        </tr>
        <tr>
          <td valign="top">define</td>
          <td style="text-align: center;">string</td>
          <td> Define conditional compilation symbol(s). </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">delaysign</td>
          <td style="text-align: center;">
            <a href="../enums/NAnt.DotNet.Types.DelaySign.html">DelaySign</a>
          </td>
          <td> Specifies whether to delay sign the assembly using only the public portion of the strong name key. The default is <code>NotSet</code>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">failonerror</td>
          <td style="text-align: center;">bool</td>
          <td> Determines if task failure stops the build, or is just reported. The default is <b>true</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">if</td>
          <td style="text-align: center;">bool</td>
          <td> If <b>true</b> then the task will be executed; otherwise, skipped. The default is <b>true</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">keycontainer</td>
          <td style="text-align: center;">string</td>
          <td> Specifies the key pair container used to strongname the assembly. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">keyfile</td>
          <td style="text-align: center;">file</td>
          <td> Specifies a strong name key file. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">main</td>
          <td style="text-align: center;">string</td>
          <td> Specifies which type contains the Main method that you want to use as the entry point into the program. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">nowarn</td>
          <td style="text-align: center;">string</td>
          <td>
            <i>Deprecated.</i>  Specifies a comma-separated list of warnings that should be suppressed by the compiler. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">rebuild</td>
          <td style="text-align: center;">bool</td>
          <td> Instructs NAnt to recompile the output file regardless of the file timestamps. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">timeout</td>
          <td style="text-align: center;">int</td>
          <td> The maximum amount of time the application is allowed to execute, expressed in milliseconds. Defaults to no time-out. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">unless</td>
          <td style="text-align: center;">bool</td>
          <td> Opposite of <code>if</code>. If <b>false</b> then the task will be executed; otherwise, skipped. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">verbose</td>
          <td style="text-align: center;">bool</td>
          <td> Determines whether the task should report detailed build log messages. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">warnaserror</td>
          <td style="text-align: center;">bool</td>
          <td> Instructs the compiler to treat all warnings as errors. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">win32icon</td>
          <td style="text-align: center;">file</td>
          <td> Icon to associate with the application. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">win32res</td>
          <td style="text-align: center;">file</td>
          <td> Specifies a Win32 resource file (.res). </td>
          <td style="text-align: center;">False</td>
        </tr>
      </table>
    </div>
    <h3>Framework-configurable 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">exename</td>
          <td style="text-align: center;">string</td>
          <td> The name of the executable that should be used to launch the external program. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">managed</td>
          <td style="text-align: center;">
            <a href="../enums/NAnt.Core.Types.ManagedExecution.html">ManagedExecution</a>
          </td>
          <td> Specifies whether the external program should be treated as a managed application, possibly forcing it to be executed under the currently targeted version of the CLR. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">noconfig</td>
          <td style="text-align: center;">bool</td>
          <td> Instructs the compiler not to use implicit references to assemblies. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">nostdlib</td>
          <td style="text-align: center;">bool</td>
          <td> Instructs the compiler not to import mscorlib.dll. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportsdelaysign</td>
          <td style="text-align: center;">bool</td>
          <td> Indicates whether the compiler for a given target framework supports the "delaysign" option. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportsdocgeneration</td>
          <td style="text-align: center;">bool</td>
          <td> Specifies whether the compiler for the active target framework supports generation of XML Documentation file. The default is <b>true</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportskeycontainer</td>
          <td style="text-align: center;">bool</td>
          <td> Indicates whether the compiler for a given target framework supports the "keycontainer" option. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportskeyfile</td>
          <td style="text-align: center;">bool</td>
          <td> Indicates whether the compiler for a given target framework supports the "keyfile" option. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportslangversion</td>
          <td style="text-align: center;">bool</td>
          <td> Specifies whether the compiler for the active target framework supports accepting only a specific language syntax. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportsnowarnlist</td>
          <td style="text-align: center;">bool</td>
          <td> Indicates whether the compiler for a given target framework supports a command line option that allows a list of warnings to be suppressed. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportspackagereferences</td>
          <td style="text-align: center;">bool</td>
          <td> Indicates whether package references are supported by compiler for a given target framework. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportsplatform</td>
          <td style="text-align: center;">bool</td>
          <td> Specifies whether the compiler for the active target framework supports limiting the platform on which the compiled code can run. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">supportswarnaserrorlist</td>
          <td style="text-align: center;">bool</td>
          <td> Indicates whether the compiler for a given target framework supports the "warnaserror" option that takes a list of warnings. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
        <tr>
          <td valign="top">useruntimeengine</td>
          <td style="text-align: center;">bool</td>
          <td>
            <i>Deprecated.</i>  Specifies whether the external program is a managed application which should be executed using a runtime engine, if configured. The default is <b>false</b>. </td>
          <td style="text-align: center;">False</td>
        </tr>
      </table>
    </div>
    <h3>Nested Elements:</h3>
    <!--Element-->
    <h4>
      <a id="warnaserror">
      </a>
                    &lt;<a href="../types/warnaserror.html">warnaserror</a>&gt;
                </h4>
    <div class="nested-element"> Controls which warnings should be reported as errors. <p /></div>
    <h4>
      <a id="warnaserror">
      </a>
                    &lt;/<a href="../types/warnaserror.html">warnaserror</a>&gt;
                </h4>
    <!--Collection-->
    <h4>
      <a id="nowarn">
      </a>
            &lt;nowarn&gt;
        </h4>
    <div class="nested-element"> Specifies a list of warnings that you want the compiler to suppress. <h5>&lt;warning&gt;</h5><div class="nested-element"><p> Represents a compiler warning. </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" class="required">number</td><td style="text-align: center;">string</td><td> A warning number, or comma-separated list of warnings, that you want the compiler to suppress or report. </td><td style="text-align: center;">True</td></tr><tr><td valign="top">if</td><td style="text-align: center;">bool</td><td> If <b>true</b> then the element will be processed; otherwise, skipped. The default is <b>true</b>. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">unless</td><td style="text-align: center;">bool</td><td> If <b>true</b> then the element will be skipped; otherwise, processed. The default is <b>false</b>. </td><td style="text-align: center;">False</td></tr></table></div></div><h5>&lt;/warning&gt;</h5></div>
    <h4>&lt;/nowarn&gt;</h4>
    <!--Element-->
    <h4>
      <a id="lib">
      </a>
                    &lt;<a href="../types/fileset.html">lib</a>&gt;
                </h4>
    <div class="nested-element">
      <i>Deprecated.</i>  Additional directories to search in for assembly references. <p /></div>
    <h4>
      <a id="lib">
      </a>
                    &lt;/<a href="../types/fileset.html">lib</a>&gt;
                </h4>
    <!--Element-->
    <h4>
      <a id="references">
      </a>
                    &lt;<a href="../types/assemblyfileset.html">references</a>&gt;
                </h4>
    <div class="nested-element"> Reference metadata from the specified assembly files. <p /></div>
    <h4>
      <a id="references">
      </a>
                    &lt;/<a href="../types/assemblyfileset.html">references</a>&gt;
                </h4>
    <!--Collection-->
    <h4>
      <a id="pkg-references">
      </a>
            &lt;pkg-references&gt;
        </h4>
    <div class="nested-element"> Specifies list of packages to reference. <h5>&lt;package&gt;</h5><div class="nested-element"><p> Represents a package. </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" class="required">name</td><td style="text-align: center;">string</td><td> Name of the package to reference. Multiple package can be specified with a single element as a semi-colon separated list of package names. </td><td style="text-align: center;">True</td></tr><tr><td valign="top">if</td><td style="text-align: center;">bool</td><td> Indicates if the package should be passed to the task. If <b>true</b> then the package will be passed; otherwise, skipped. The default is <b>true</b>. </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 package should not be passed to the task. If <b>false</b> then the package will be passed; otherwise, skipped. The default is <b>false</b>. </td><td style="text-align: center;">False</td></tr></table></div></div><h5>&lt;/package&gt;</h5></div>
    <h4>&lt;/pkg-references&gt;</h4>
    <!--Array-->
    <!--NestedElementArray=T:NAnt.DotNet.Types.ResourceFileSet-->
    <h4>
      <a id="resources">
      </a>
                    &lt;<a href="../types/resourcefileset.html">resources</a>&gt;
                </h4>
    <div class="nested-element"> Resources to embed. </div>
    <h4>
      <a id="resources">
      </a>
                    &lt;/<a href="../types/resourcefileset.html">resources</a>&gt;
                </h4>
    <!--Element-->
    <h4>
      <a id="modules">
      </a>
                    &lt;<a href="../types/assemblyfileset.html">modules</a>&gt;
                </h4>
    <div class="nested-element"> Link the specified modules into this assembly. <p /></div>
    <h4>
      <a id="modules">
      </a>
                    &lt;/<a href="../types/assemblyfileset.html">modules</a>&gt;
                </h4>
    <!--Element-->
    <h4>
      <a id="sources">
      </a>
                    &lt;<a href="../types/fileset.html">sources</a>&gt;
                </h4>
    <div class="nested-element"> The set of source files for compilation. <p /></div>
    <h4>
      <a id="sources">
      </a>
                    &lt;/<a href="../types/fileset.html">sources</a>&gt;
                </h4>
    <!--Array-->
    <!--NestedElementArray=T:NAnt.Core.Types.Argument-->
    <h4>
      <a id="arg">
      </a>
                    &lt;arg&gt;
                </h4>
    <div class="nested-element"> The command-line arguments for the external program. <p> Represents a command-line argument. </p><p> When passed to an external application, the argument will be quoted when appropriate. This does not apply to the <code>line</code> parameter, which is always passed as is. </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">dir</td><td style="text-align: center;">directory</td><td> The value for a directory-based command-line argument; will be replaced with the absolute path of the directory. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">file</td><td style="text-align: center;">file</td><td> The name of a file as a single command-line argument; will be replaced with the absolute filename of the file. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">if</td><td style="text-align: center;">bool</td><td> Indicates if the argument should be passed to the external program. If <b>true</b> then the argument will be passed; otherwise, skipped. The default is <b>true</b>. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">line</td><td style="text-align: center;">string</td><td> List of command-line arguments; will be passed to the executable as is. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">path</td><td style="text-align: center;">&lt;path&gt;</td><td> The value for a PATH-like command-line argument; you can use <code>:</code> or <code>;</code> as path separators and NAnt will convert it to the platform's local conventions, while resolving references to environment variables. </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 argument should not be passed to the external program. If <b>false</b> then the argument will be passed; otherwise, skipped. The default is <b>false</b>. </td><td style="text-align: center;">False</td></tr><tr><td valign="top">value</td><td style="text-align: center;">string</td><td> A single command-line argument; can contain space characters. </td><td style="text-align: center;">False</td></tr></table></div><h3>Nested Elements:</h3><!--Element--><h4><a id="path"></a>
                    &lt;<a href="../types/path.html">path</a>&gt;
                </h4><div class="nested-element"> Sets a single command-line argument and treats it like a PATH - ensures the right separator for the local platform is used. <p /></div><h4><a id="path"></a>
                    &lt;/<a href="../types/path.html">path</a>&gt;
                </h4><h3>Examples</h3><ul class="examples"><li><p> A single command-line argument containing a space character. </p><pre class="code">
&lt;arg value="-l -a" /&gt;
    </pre></li><li><p> Two separate command-line arguments. </p><pre class="code">
&lt;arg line="-l -a" /&gt;
    </pre></li><li><p> A single command-line argument with the value <code>\dir;\dir2;\dir3</code> on DOS-based systems and <code>/dir:/dir2:/dir3</code> on Unix-like systems. </p><pre class="code">
&lt;arg path="/dir;/dir2:\dir3" /&gt;
    </pre></li></ul></div>
    <h4>
      <a id="arg">
      </a>
                    &lt;/arg&gt;
                </h4>
    <h3>Examples</h3>
    <ul class="examples">
      <li>
        <p>Compile a "HelloWorld" application, including embedded resources.</p>
        <pre class="code">
&lt;csc target="exe" output="HelloWorld.exe" debug="true"&gt;
    &lt;nowarn&gt;
        &lt;!-- do not report warnings for missing XML comments --&gt;
        &lt;warning number="0519" /&gt;
    &lt;/nowarn&gt;
    &lt;sources&gt;
        &lt;include name="**/*.cs" /&gt;
    &lt;/sources&gt;
    &lt;resources dynamicprefix="true" prefix="HelloWorld"&gt;
        &lt;include name="**/*.resx" /&gt;
    &lt;/resources&gt;
    &lt;references&gt;
        &lt;include name="System.dll" /&gt;
        &lt;include name="System.Data.dll" /&gt;
    &lt;/references&gt;
&lt;/csc&gt;
    </pre>
      </li>
    </ul>
    <h3>Requirements</h3>
    <div style="margin-left: 20px;">
      <b>Assembly:</b> NAnt.DotNetTasks (0.92.4543.0)
            </div>
  </body>
</html>