Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
62 changes: 32 additions & 30 deletions xml/Microsoft.CSharp/Compiler.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,9 @@
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
To compile C\# code in-process, call <xref:Microsoft.CSharp.Compiler.Compile(System.String[],System.String[],System.String,System.String[],System.Collections.IDictionary)>.
## Remarks

To compile C# code in-process, call <xref:Microsoft.CSharp.Compiler.Compile(System.String[],System.String[],System.String,System.String[],System.Collections.IDictionary)>.

]]></format>
</remarks>
Expand Down Expand Up @@ -66,40 +67,41 @@ To compile C\# code in-process, call <xref:Microsoft.CSharp.Compiler.Compile(Sys
<remarks>
<format type="text/markdown"><![CDATA[

## Remarks
Each string in the sourceTexts parameter is the equivalent of a single source file. There must be at least one sourceTexts element.
## Remarks

Each string in the `sourceTexts` parameter is the equivalent of a single source file. There must be at least one `sourceTexts` element.

The file names in the sourceTextNames parameter are used for compiler diagnostics and debug information. The array is required, but it can be locally overridden by use of the \#line directive. The array must have the same number of elements as the sourceTexts parameter.
The file names in the `sourceTextNames` parameter are used for compiler diagnostics and debug information. The array is required, but it can be locally overridden by use of the `#line` directive. The array must have the same number of elements as the `sourceTexts` parameter.

The imports parameter is the same as the /reference compiler option. This parameter `null`.
The `imports` parameter is the same as the `/reference` compiler option. This parameter can be `null`.

For the options parameter, the key is the short form of the compiler option. The value is the value desired for the option. The options parameter can be `null`. Some compiler options are not recognized. Recognized options and value:
For the `options` parameter, the key is the short form of the compiler option. The value is the value desired for the option. The `options` parameter can be `null`. Some compiler options are not recognized. The following table shows the recognized options and values.

| Key Name | Usage |
| --- | --- |
| addmodule | List of modules to include in this assembly. The module names must be separated by the vertical bar or pipe character. Value must be of type <xref:System.String>. See [-addmodule (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/addmodule-compiler-option). |
| baseaddress | Base address for libraries. Value must be of type <xref:System.UInt32>. See [-baseaddress (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/baseaddress-compiler-option). |
| bugreport | Produces bug report file. Value must be of type <xref:System.String>. See [-bugreport (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/bugreport-compiler-option). |
| checked | Set default expression evaluation to checked (or unchecked). Value must be of type <xref:System.Boolean>. See [-checked (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/checked-compiler-option). |
| d | List of semicolon separated symbols to define. Value must be of type <xref:System.String>. See [-define (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/define-compiler-option). |
| debug | Emit debug information with output. Value must be of type <xref:System.Boolean>. Full or pdb-only cannot be specified. See [-debug (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/debug-compiler-option). |
| doc | File name to put XML comments in. Value must be of type <xref:System.String>. See [-doc (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/doc-compiler-option). |
| filealign | PE section alignment size. Value must be of type <xref:System.UInt32>. See [-filealign (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/filealign-compiler-option). |
| incr | Enable incremental rebuild. Value must be of type <xref:System.Boolean>. |
| lib | Additional paths to search when locating modules and referenced assemblies. Value must be of type <xref:System.String>. See [-lib (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/lib-compiler-option). |
| linkres | Link a managed resource to the assembly. Value must be of type <xref:System.String>. See [-linkresource (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/linkresource-compiler-option). |
| m | Type to search in for the Main method. Value must be of type <xref:System.String>. See [-main (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/main-compiler-option). |
| nostdlib | Do not auto-reference mscorlib.dll. Value must be of type <xref:System.Boolean>. See [-nostdlib (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/nostdlib-compiler-option). |
| nowarn | List of semicolon separated warning numbers to not report. Value must be of type <xref:System.String>. See [-nowarn (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/nowarn-compiler-option). |
| o | Enable compiler optimizations. Value must be of type <xref:System.Boolean>. See [-optimize (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/optimize-compiler-option). |
| r | Referenced assemblies. Value must be of type String. If more than one assembly is specified, the file name must be separated by the vertical bar or pipe character. See [-reference (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/reference-compiler-option). |
| res | Embed a managed resource. Value must be of type <xref:System.String>. See [-resource (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/resource-compiler-option). |
| target | Output file target type, one of the following: "library", "exe", "winexe", or "module". Value must be of type <xref:System.String>. See [-target (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/target-compiler-option). |
| unsafe | Allow unsafe constructs. Value must be of type <xref:System.Boolean>. See [-unsafe (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/unsafe-compiler-option). |
| w | Warning level (0-4). Value must be of type <xref:System.String>. See [-warn (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/warn-compiler-option). |
| warnaserror | Report warning diagnostics as errors. Value must be of type <xref:System.Boolean>. See [-warnaserror (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/warnaserror-compiler-option). |
| win32icon | Win32 icon for auto generated Win32 resource. Value must be of type <xref:System.String>. See [-win32icon (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/win32icon-compiler-option). |
| win32res | Win32 resource file. Value must be of type <xref:System.String>. See [-win32res (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/win32res-compiler-option). |
| `addmodule` | List of modules to include in this assembly. The module names must be separated by the vertical bar or pipe character. Value must be of type <xref:System.String>. See [-addmodule (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/addmodule-compiler-option). |
| `baseaddress` | Base address for libraries. Value must be of type <xref:System.UInt32>. See [-baseaddress (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/baseaddress-compiler-option). |
| `bugreport` | Produces bug report file. Value must be of type <xref:System.String>. See [-bugreport (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/bugreport-compiler-option). |
| `checked` | Set default expression evaluation to checked (or unchecked). Value must be of type <xref:System.Boolean>. See [-checked (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/checked-compiler-option). |
| `d` | List of semicolon separated symbols to define. Value must be of type <xref:System.String>. See [-define (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/define-compiler-option). |
| `debug` | Emit debug information with output. Value must be of type <xref:System.Boolean>. Full or pdb-only cannot be specified. See [-debug (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/debug-compiler-option). |
| `doc` | File name to put XML comments in. Value must be of type <xref:System.String>. See [-doc (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/doc-compiler-option). |
| `filealign` | PE section alignment size. Value must be of type <xref:System.UInt32>. See [-filealign (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/filealign-compiler-option). |
| `incr` | Enable incremental rebuild. Value must be of type <xref:System.Boolean>. |
| `lib` | Additional paths to search when locating modules and referenced assemblies. Value must be of type <xref:System.String>. See [-lib (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/lib-compiler-option). |
| `linkres` | Link a managed resource to the assembly. Value must be of type <xref:System.String>. See [-linkresource (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/linkresource-compiler-option). |
| `m` | Type to search in for the Main method. Value must be of type <xref:System.String>. See [-main (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/main-compiler-option). |
| `nostdlib` | Do not auto-reference mscorlib.dll. Value must be of type <xref:System.Boolean>. See [-nostdlib (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/nostdlib-compiler-option). |
| `nowarn` | List of semicolon separated warning numbers to not report. Value must be of type <xref:System.String>. See [-nowarn (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/nowarn-compiler-option). |
| `o` | Enable compiler optimizations. Value must be of type <xref:System.Boolean>. See [-optimize (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/optimize-compiler-option). |
| `r` | Referenced assemblies. Value must be of type String. If more than one assembly is specified, the file name must be separated by the vertical bar or pipe character. See [-reference (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/reference-compiler-option). |
| `res` | Embed a managed resource. Value must be of type <xref:System.String>. See [-resource (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/resource-compiler-option). |
| `target` | Output file target type, one of the following: "library", "exe", "winexe", or "module". Value must be of type <xref:System.String>. See [-target (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/target-compiler-option). |
| `unsafe` | Allow unsafe constructs. Value must be of type <xref:System.Boolean>. See [-unsafe (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/unsafe-compiler-option). |
| `w` | Warning level (0-4). Value must be of type <xref:System.String>. See [-warn (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/warn-compiler-option). |
| `warnaserror` | Report warning diagnostics as errors. Value must be of type <xref:System.Boolean>. See [-warnaserror (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/warnaserror-compiler-option). |
| `win32icon` | Win32 icon for auto generated Win32 resource. Value must be of type <xref:System.String>. See [-win32icon (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/win32icon-compiler-option). |
| `win32res` | Win32 resource file. Value must be of type <xref:System.String>. See [-win32res (C# Compiler Options)](/dotnet/csharp/language-reference/compiler-options/win32res-compiler-option). |

]]></format>
</remarks>
Expand Down