Compiles C# programs.
For a list of all members of this type, see CscTask Members.
System.Object
NAnt.Core.Element
NAnt.Core.Task
NAnt.Core.Tasks.ExternalProgramBase
NAnt.DotNet.Tasks.CompilerBase
NAnt.DotNet.Tasks.CscTask
Public static (Shared in Visual Basic) members of this type are safe for multithreaded operations. Instance members are not guaranteed to be thread-safe.
Note In order to have CscTask generate manifest resource names that match those generated by Microsoft Visual Studio.NET, the value of the Prefix attribute of the <ResourcesList> element should match the "Default Namespace" of the C# project, and the value of the DynamicPrefix attribute should be set to "true".
Compile a "HelloWorld" application, including embedded resources.
<csc target="exe" output="HelloWorld.exe" debug="true"> <nowarn> <!-- do not report warnings for missing XML comments --> <warning number="0519" /> </nowarn> <sources> <include name="**/*.cs" /> </sources> <resources dynamicprefix="true" prefix="HelloWorld"> <include name="**/*.resx" /> </resources> <references> <include name="System.dll" /> <include name="System.Data.dll" /> </references> </csc>
Namespace: NAnt.DotNet.Tasks
Assembly: NAnt.DotNetTasks (in NAnt.DotNetTasks.dll)
CscTask Members | NAnt.DotNet.Tasks Namespace