diff --git a/docs/csharp/fundamentals/program-structure/main-command-line.md b/docs/csharp/fundamentals/program-structure/main-command-line.md
index 2c05e82edfb1d..e32e9ed00df2f 100644
--- a/docs/csharp/fundamentals/program-structure/main-command-line.md
+++ b/docs/csharp/fundamentals/program-structure/main-command-line.md
@@ -16,7 +16,7 @@ helpviewer_keywords:
The `Main` method is the entry point of a C# application. When the application is started, the `Main` method is the first method that is invoked.
-There can only be one entry point in a C# program. If you have more than one class that has a `Main` method, you must compile your program with the **StartupObject** compiler option to specify which `Main` method to use as the entry point. For more information, see [**StartupObject** (C# Compiler Options)](../../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject). The following example displays the number of command line arguments as its first action:
+There can only be one entry point in a C# program. If you have more than one class that has a `Main` method, you must compile your program with the **StartupObject** compiler option to specify which `Main` method to use as the entry point. For more information, see [**StartupObject** (C# Compiler Options)](../../language-reference/compiler-options/advanced.md#startupobject). The following example displays the number of command line arguments as its first action:
:::code language="csharp" source="snippets/main-command-line/TestClass.cs":::
diff --git a/docs/csharp/fundamentals/program-structure/top-level-statements.md b/docs/csharp/fundamentals/program-structure/top-level-statements.md
index 685daa1814d0e..3396d27a69988 100644
--- a/docs/csharp/fundamentals/program-structure/top-level-statements.md
+++ b/docs/csharp/fundamentals/program-structure/top-level-statements.md
@@ -38,7 +38,7 @@ You can write a `Main` method explicitly, but it can't function as an entry poin
> CS7022 The entry point of the program is global code; ignoring 'Main()' entry point.
-In a project with top-level statements, you can't use the [-main](../../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option to select the entry point, even if the project has one or more `Main` methods.
+In a project with top-level statements, you can't use the [-main](../../language-reference/compiler-options/advanced.md#startupobject) compiler option to select the entry point, even if the project has one or more `Main` methods.
## `using` directives
diff --git a/docs/csharp/language-reference/compiler-options/advanced.md b/docs/csharp/language-reference/compiler-options/advanced.md
index 6477549e92ba2..fb37e22e45914 100644
--- a/docs/csharp/language-reference/compiler-options/advanced.md
+++ b/docs/csharp/language-reference/compiler-options/advanced.md
@@ -9,7 +9,7 @@ helpviewer_keywords:
- "ChecksumAlgorithm compiler option [C#]"
- "CodePage compiler option [C#]"
- "Utf8Output compiler option [C#]"
- - "MainEntryPoint compiler option [C#]"
+ - "StartupObject compiler option [C#]"
- "GenerateFullPaths compiler option [C#]"
- "FileAlignment compiler option [C#]"
- "PathMap compiler option [C#]"
@@ -27,7 +27,7 @@ helpviewer_keywords:
The following options support advanced scenarios. The new MSBuild syntax is shown in **Bold**. The older `csc.exe` syntax is shown in `code style`.
-- **MainEntryPoint**, **StartupObject** / `-main`: Specify the type that contains the entry point.
+- **StartupObject** / `-main`: Specify the type that contains the entry point.
- **PdbFile** / `-pdb`: Specify debug information file name.
- **PathMap** / `-pathmap`: Specify a mapping for source path names output by the compiler.
- **ApplicationConfiguration** / `-appconfig`: Specify an application configuration file containing assembly binding settings.
@@ -54,7 +54,7 @@ You add any of these options in a `` element in your `*.csproj` f
``````
-## MainEntryPoint or StartupObject
+## StartupObject
This option specifies the class that contains the entry point to the program, if more than one class contains a `Main` method.
@@ -62,13 +62,7 @@ This option specifies the class that contains the entry point to the program, if
MyNamespace.Program
```
-or
-
-```xml
-MyNamespace.Program
-```
-
-Where `Program` is the type that contains the `Main` method. The provided class name must be fully qualified; it must include the full namespace containing the class, followed by the class name. For example, when the `Main` method is located inside the `Program` class in the `MyApplication.Core` namespace, the compiler option has to be `-main:MyApplication.Core.Program`. If your compilation includes more than one type with a [`Main`](../../fundamentals/program-structure/main-command-line.md) method, you can specify which type contains the `Main` method.
+Where `Program` is the type that contains the `Main` method. The class name can be either fully qualified (including the namespace) or just the class name if it's unambiguous. For example, when the `Main` method is located inside the `Program` class in the `MyApplication.Core` namespace, you can specify either `-main:MyApplication.Core.Program` or just `-main:Program` if there's no ambiguity. If your compilation includes more than one type with a [`Main`](../../fundamentals/program-structure/main-command-line.md) method, you can specify which type contains the `Main` method.
> [!NOTE]
> This option can't be used for a project that includes [top-level statements](../../fundamentals/program-structure/top-level-statements.md), even if that project contains one or more `Main` methods.
@@ -245,7 +239,7 @@ Use this option if you want to define or create your own System namespace and ob
Specifies the minimum version of the subsystem on which the executable file runs. Most commonly, this option ensures that the executable file can use security features that aren’t available with older versions of Windows.
> [!NOTE]
-> To specify the subsystem itself, use the [**TargetType**](./output.md#targettype) compiler option.
+> To specify the subsystem itself, use the [**OutputType**](./output.md#outputtype) compiler option.
```xml
major.minor
@@ -266,9 +260,9 @@ The following table lists common subsystem versions of Windows.
The default value of the **SubsystemVersion** compiler option depends on the conditions in the following list:
- The default value is 6.02 if any compiler option in the following list is set:
- - [-target:appcontainerexe](output.md)
- - [-target:winmdobj](output.md)
- - [-platform:arm](output.md)
+ - [-target:appcontainerexe](output.md#outputtype)
+ - [-target:winmdobj](output.md#outputtype)
+ - [-platform:arm](output.md#platformtarget)
- The default value is 6.00 if you're using MSBuild, you're targeting .NET Framework 4.5, and you haven't set any of the compiler options that were specified earlier in this list.
- The default value is 4.00 if none of the previous conditions are true.
@@ -286,7 +280,7 @@ Specifies the name of an assembly whose nonpublic types a *.netmodule* can acces
- You know the name of the assembly into which the .netmodule will be built.
- The existing assembly has granted friend assembly access to the assembly into which the .*netmodule* will be built.
-For more information on building a .netmodule, see [**TargetType**](output.md#targettype) option of **module**. For more information on friend assemblies, see [Friend Assemblies](../../../standard/assembly/friend.md).
+For more information on building a .netmodule, see [**OutputType**](output.md#outputtype) option of **module**. For more information on friend assemblies, see [Friend Assemblies](../../../standard/assembly/friend.md).
## ReportIVTs
diff --git a/docs/csharp/language-reference/compiler-options/inputs.md b/docs/csharp/language-reference/compiler-options/inputs.md
index ae3b173b870fd..2e137788f00c2 100644
--- a/docs/csharp/language-reference/compiler-options/inputs.md
+++ b/docs/csharp/language-reference/compiler-options/inputs.md
@@ -40,16 +40,16 @@ In the previous example, `LS` is the valid C# identifier that represents a root
## AddModules
-This option adds a module that was created with the `module` switch to the current compilation:
+This option adds a module that was created with the `module` switch to the current compilation:
```xml
```
-Where `file`, `file2` are output files that contain metadata. The file can't contain an assembly manifest. To import more than one file, separate file names with either a comma or a semicolon. All modules added with **AddModules** must be in the same directory as the output file at run time. That is, you can specify a module in any directory at compile time but the module must be in the application directory at run time. If the module isn't in the application directory at run time, you'll get a . `file` can't contain an assembly. For example, if the output file was created with [**TargetType**](output.md#targettype) option of **module**, its metadata can be imported with **AddModules**.
+Where `file`, `file2` are output files that contain metadata. The file can't contain an assembly manifest. To import more than one file, separate file names with either a comma or a semicolon. All modules added with **AddModules** must be in the same directory as the output file at run time. That is, you can specify a module in any directory at compile time but the module must be in the application directory at run time. If the module isn't in the application directory at run time, you'll get a . `file` can't contain an assembly. For example, if the output file was created with [**OutputType**](output.md#outputtype) option of **module**, its metadata can be imported with **AddModules**.
-If the output file was created with a [**TargetType**](output.md#targettype) option other than **module**, its metadata cannot be imported with **AddModules** but can be imported with the [**References**](#references) option.
+If the output file was created with a [**OutputType**](output.md#outputtype) option other than **module**, its metadata cannot be imported with **AddModules** but can be imported with the [**References**](#references) option.
## EmbedInteropTypes
diff --git a/docs/csharp/language-reference/compiler-options/output.md b/docs/csharp/language-reference/compiler-options/output.md
index 1535d7d74a532..649cdb1bb2859 100644
--- a/docs/csharp/language-reference/compiler-options/output.md
+++ b/docs/csharp/language-reference/compiler-options/output.md
@@ -9,7 +9,7 @@ helpviewer_keywords:
- "OutputAssembly compiler option [C#]"
- "PlatformTarget compiler option [C#]"
- "ProduceReferenceAssembly compiler option [C#]"
- - "TargetType compiler option [C#]"
+ - "OutputType compiler option [C#]"
---
# C# Compiler Options that control compiler output
@@ -21,7 +21,7 @@ The following options control compiler output generation.
| **OutputAssembly** | `-out:` | Specify the output assembly file. |
| **PlatformTarget** | `-platform:` | Specify the target platform CPU. |
| **ProduceReferenceAssembly** | `-refout:` | Generate a reference assembly. |
-| **TargetType** | `-target:` | Specify the type of the output assembly. |
+| **OutputType** | `-target:` | Specify the type of the output assembly. |
> [!NOTE]
> Refer to [Compiler options](index.md#how-to-set-options) for more information on configuring these options for your project.
@@ -34,7 +34,7 @@ The **DocumentationFile** option allows you to place documentation comments in a
path/to/file.xml
```
-The source code file that contains Main or top-level statements is output first into the XML. You'll often want to use the generated .xml file with [IntelliSense](/visualstudio/ide/using-intellisense). The *.xml* filename must be the same as the assembly name. The *.xml* file must be in the same directory as the assembly. When the assembly is referenced in a Visual Studio project, the *.xml* file is found as well. For more information about generating code comments, see [Supplying Code Comments](/visualstudio/ide/reference/generate-xml-documentation-comments). Unless you compile with [``](#targettype), `file` will contain `` and `` tags specifying the name of the file containing the assembly manifest for the output file. For examples, see [How to use the XML documentation features](../xmldoc/index.md).
+The source code file that contains Main or top-level statements is output first into the XML. You'll often want to use the generated .xml file with [IntelliSense](/visualstudio/ide/using-intellisense). The *.xml* filename must be the same as the assembly name. The *.xml* file must be in the same directory as the assembly. When the assembly is referenced in a Visual Studio project, the *.xml* file is found as well. For more information about generating code comments, see [Supplying Code Comments](/visualstudio/ide/reference/generate-xml-documentation-comments). Unless you compile with [``](#outputtype), `file` will contain `` and `` tags specifying the name of the file containing the assembly manifest for the output file. For examples, see [How to use the XML documentation features](../xmldoc/index.md).
> [!NOTE]
> The **DocumentationFile** option applies to all files in the project. To disable warnings related to documentation comments for a specific file or section of code, use [#pragma warning](../preprocessor-directives.md#pragma-warning).
@@ -43,13 +43,14 @@ This option can be used in any .NET SDK-style project. For more information, see
## OutputAssembly
-The **OutputAssembly** option specifies the name of the output file. The output path specifies the folder where compiler output is placed.
+The **OutputAssembly** option specifies the name of the output file. This option corresponds to the combination of the `OutputPath` and `AssemblyName` MSBuild properties that control where the compiled assembly is placed and what it's named.
```xml
-folder
+bin\Debug\
+MyApplication
```
-Specify the full name and extension of the file you want to create. If you don't specify the name of the output file, MSBuild uses the name of the project to specify the name of the output assembly. Old style projects use the following rules:
+Specify the name and extension of the file you want to create. The path can be relative or absolute. If you don't specify the name of the output file, MSBuild uses the project name to specify the name of the output assembly. Old style projects use the following rules:
- An .exe will take its name from the source code file that contains the `Main` method or top-level statements.
- A .dll or .netmodule will take its name from the first source code file.
@@ -103,9 +104,9 @@ You generally don't need to work directly with reference assembly files. By defa
.NET SDK 6.0.200 made a [change](../../../core/compatibility/sdk/6.0/write-reference-assemblies-to-obj.md) that moved reference assemblies from the output directory to the intermediate directory by default.
-## TargetType
+## OutputType
-The **TargetType** compiler option can be specified in one of the following forms:
+The **OutputType** compiler option can be specified in one of the following forms:
- **library**: to create a code library. **library** is the default value.
- **exe**: to create an .exe file.
@@ -118,7 +119,7 @@ The **TargetType** compiler option can be specified in one of the following form
> For .NET Framework targets, unless you specify **module**, this option causes a .NET Framework assembly manifest to be placed in an output file. For more information, see [Assemblies in .NET](../../../standard/assembly/index.md) and [Common Attributes](../attributes/global.md).
```xml
-library
+library
```
The compiler creates only one assembly manifest per compilation. Information about all files in a compilation is placed in the assembly manifest. When producing multiple output files at the command line, only one assembly manifest can be created and it must go into the first output file specified on the command line.
@@ -131,7 +132,7 @@ The **library** option causes the compiler to create a dynamic-link library (DLL
### exe
-The **exe** option causes the compiler to create an executable (EXE), console application. The executable file will be created with the .exe extension. Use **winexe** to create a Windows program executable. Unless otherwise specified with the [**OutputAssembly**](#outputassembly) option, the output file name takes the name of the input file that contains the entry point ([Main](../../fundamentals/program-structure/main-command-line.md) method or top-level statements). One and only one entry point is required in the source code files that are compiled into an .exe file. The [**StartupObject**](./advanced.md#mainentrypoint-or-startupobject) compiler option lets you specify which class contains the `Main` method, in cases where your code has more than one class with a `Main` method.
+The **exe** option causes the compiler to create an executable (EXE), console application. The executable file will be created with the .exe extension. Use **winexe** to create a Windows program executable. Unless otherwise specified with the [**OutputAssembly**](#outputassembly) option, the output file name takes the name of the input file that contains the entry point ([Main](../../fundamentals/program-structure/main-command-line.md) method or top-level statements). One and only one entry point is required in the source code files that are compiled into an .exe file. The [**StartupObject**](./advanced.md#startupobject) compiler option lets you specify which class contains the `Main` method, in cases where your code has more than one class with a `Main` method.
### module
@@ -139,7 +140,7 @@ This option causes the compiler to not generate an assembly manifest. By default
### winexe
-The **winexe** option causes the compiler to create an executable (EXE), Windows program. The executable file will be created with the .exe extension. A Windows program is one that provides a user interface from either the .NET library or with the Windows APIs. Use **exe** to create a console application. Unless otherwise specified with the [**OutputAssembly**](#outputassembly) option, the output file name takes the name of the input file that contains the [`Main`](../../fundamentals/program-structure/main-command-line.md) method. One and only one `Main` method is required in the source code files that are compiled into an .exe file. The [**StartupObject**](./advanced.md#mainentrypoint-or-startupobject) option lets you specify which class contains the `Main` method, in cases where your code has more than one class with a `Main` method.
+The **winexe** option causes the compiler to create an executable (EXE), Windows program. The executable file will be created with the .exe extension. A Windows program is one that provides a user interface from either the .NET library or with the Windows APIs. Use **exe** to create a console application. Unless otherwise specified with the [**OutputAssembly**](#outputassembly) option, the output file name takes the name of the input file that contains the [`Main`](../../fundamentals/program-structure/main-command-line.md) method. One and only one `Main` method is required in the source code files that are compiled into an .exe file. The [**StartupObject**](./advanced.md#startupobject) option lets you specify which class contains the `Main` method, in cases where your code has more than one class with a `Main` method.
### winmdobj
diff --git a/docs/csharp/language-reference/compiler-options/security.md b/docs/csharp/language-reference/compiler-options/security.md
index c35a0bae7c059..cd58bbff2e12e 100644
--- a/docs/csharp/language-reference/compiler-options/security.md
+++ b/docs/csharp/language-reference/compiler-options/security.md
@@ -54,7 +54,7 @@ Specifies the filename containing the cryptographic key.
filename
```
-`file` is the name of the file containing the strong name key. When this option is used, the compiler inserts the public key from the specified file into the assembly manifest and then signs the final assembly with the private key. To generate a key file, type `sn -k file` at the command line. If you compile with [**-target:module**](output.md#targettype), the name of the key file is held in the module and incorporated into the assembly created when you compile an assembly with [**AddModules**](inputs.md#addmodules). You can also pass your encryption information to the compiler with [**KeyContainer**](#keycontainer). Use [**DelaySign**](#delaysign) if you want a partially signed assembly. In case both **KeyFile** and **KeyContainer** are specified in the same compilation, the compiler will first try the key container. If that succeeds, then the assembly is signed with the information in the key container. If the compiler doesn't find the key container, it will try the file specified with [**KeyFile**](#keyfile). If that succeeds, the assembly is signed with the information in the key file and the key information will be installed in the key container. On the next compilation, the key container will be valid. A key file might contain only the public key. For more information, see [Creating and Using Strong-Named Assemblies](../../../standard/assembly/create-use-strong-named.md) and [Delay Signing an Assembly](../../../standard/assembly/delay-sign.md).
+`file` is the name of the file containing the strong name key. When this option is used, the compiler inserts the public key from the specified file into the assembly manifest and then signs the final assembly with the private key. To generate a key file, type `sn -k file` at the command line. If you compile with [**-target:module**](output.md#outputtype), the name of the key file is held in the module and incorporated into the assembly created when you compile an assembly with [**AddModules**](inputs.md#addmodules). You can also pass your encryption information to the compiler with [**KeyContainer**](#keycontainer). Use [**DelaySign**](#delaysign) if you want a partially signed assembly. In case both **KeyFile** and **KeyContainer** are specified in the same compilation, the compiler will first try the key container. If that succeeds, then the assembly is signed with the information in the key container. If the compiler doesn't find the key container, it will try the file specified with [**KeyFile**](#keyfile). If that succeeds, the assembly is signed with the information in the key file and the key information will be installed in the key container. On the next compilation, the key container will be valid. A key file might contain only the public key. For more information, see [Creating and Using Strong-Named Assemblies](../../../standard/assembly/create-use-strong-named.md) and [Delay Signing an Assembly](../../../standard/assembly/delay-sign.md).
## KeyContainer
@@ -64,7 +64,7 @@ Specifies the name of the cryptographic key container.
container
```
-`container` is the name of the strong name key container. When the **KeyContainer** option is used, the compiler creates a sharable component. The compiler inserts a public key from the specified container into the assembly manifest and signs the final assembly with the private key. To generate a key file, type `sn -k file` at the command line. `sn -i` installs the key pair into a container. This option isn't supported when the compiler runs on CoreCLR. To sign an assembly when building on CoreCLR, use the [**KeyFile**](#keyfile) option. If you compile with [**TargetType**](output.md#targettype), the name of the key file is held in the module and incorporated into the assembly when you compile this module into an assembly with [**AddModules**](inputs.md#addmodules). You can also specify this option as a custom attribute () in the source code for any common intermediate language (CIL) module. You can also pass your encryption information to the compiler with [**KeyFile**](#keyfile). Use [**DelaySign**](#delaysign) to add the public key to the assembly manifest but signing the assembly until it has been tested. For more information, see [Creating and Using Strong-Named Assemblies](../../../standard/assembly/create-use-strong-named.md) and [Delay Signing an Assembly](../../../standard/assembly/delay-sign.md).
+`container` is the name of the strong name key container. When the **KeyContainer** option is used, the compiler creates a sharable component. The compiler inserts a public key from the specified container into the assembly manifest and signs the final assembly with the private key. To generate a key file, type `sn -k file` at the command line. `sn -i` installs the key pair into a container. This option isn't supported when the compiler runs on CoreCLR. To sign an assembly when building on CoreCLR, use the [**KeyFile**](#keyfile) option. If you compile with [**OutputType**](output.md#outputtype), the name of the key file is held in the module and incorporated into the assembly when you compile this module into an assembly with [**AddModules**](inputs.md#addmodules). You can also specify this option as a custom attribute () in the source code for any common intermediate language (CIL) module. You can also pass your encryption information to the compiler with [**KeyFile**](#keyfile). Use [**DelaySign**](#delaysign) to add the public key to the assembly manifest but signing the assembly until it has been tested. For more information, see [Creating and Using Strong-Named Assemblies](../../../standard/assembly/create-use-strong-named.md) and [Delay Signing an Assembly](../../../standard/assembly/delay-sign.md).
## HighEntropyVA
diff --git a/docs/csharp/misc/cs0017.md b/docs/csharp/misc/cs0017.md
index f2010bd78c255..f0dc2808c4c88 100644
--- a/docs/csharp/misc/cs0017.md
+++ b/docs/csharp/misc/cs0017.md
@@ -16,7 +16,7 @@ Program 'output file name' has more than one entry point defined. Compile with /
[!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)]
- To resolve this error, you can either delete all Main methods in your code, except one, or you can use the [**StartupObject**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option to specify which Main method you want to use.
+ To resolve this error, you can either delete all Main methods in your code, except one, or you can use the [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option to specify which Main method you want to use.
The following sample generates CS0017:
diff --git a/docs/csharp/misc/cs0734.md b/docs/csharp/misc/cs0734.md
index c68a2d0292d1d..b9f70786d26d3 100644
--- a/docs/csharp/misc/cs0734.md
+++ b/docs/csharp/misc/cs0734.md
@@ -14,7 +14,7 @@ The /moduleassemblyname option may only be specified when building a target type
The compiler option **ModuleAssemblyName** should only be used when building a .netmodule. See [**ModuleAssemblyName** (C# Compiler Option)](../language-reference/compiler-options/advanced.md#moduleassemblyname) for more information.
- For more information on building a .netmodule, see the **module** element for the [**TargetType** (C# Compiler Options)](../language-reference/compiler-options/output.md#targettype).
+ For more information on building a .netmodule, see the **module** element for the [**OutputType** (C# Compiler Options)](../language-reference/compiler-options/output.md#outputtype).
## Example
diff --git a/docs/csharp/misc/cs1507.md b/docs/csharp/misc/cs1507.md
index 30147f2140809..285fc2f040b7a 100644
--- a/docs/csharp/misc/cs1507.md
+++ b/docs/csharp/misc/cs1507.md
@@ -12,7 +12,7 @@ ms.assetid: e1be3aba-81dc-4f65-87a4-d3f90b82dc7d
Cannot link resource file 'file' when building a module
- [**LinkResources**](../language-reference/compiler-options/resources.md#linkresources) was used in the same compilation with the **module** option on the [**TargetType**](../language-reference/compiler-options/output.md#targettype), which is not allowed. For example, the following options would generate CS1507:
+ [**LinkResources**](../language-reference/compiler-options/resources.md#linkresources) was used in the same compilation with the **module** option on the [**OutputType**](../language-reference/compiler-options/output.md#outputtype), which is not allowed. For example, the following options would generate CS1507:
```console
csc /linkresource:rf.resource /target:module in.cs
diff --git a/docs/csharp/misc/cs1509.md b/docs/csharp/misc/cs1509.md
index 29b4a72c3d4ba..8617f596a6c08 100644
--- a/docs/csharp/misc/cs1509.md
+++ b/docs/csharp/misc/cs1509.md
@@ -12,4 +12,4 @@ ms.assetid: 51a475c3-f085-49cb-89b0-c6582b68653f
Referenced file 'file' is not an assembly; use **AddModules** option instead
- An output file (output file 1), produced in a compilation that used the **module** element of the [**TargetType**](../language-reference/compiler-options/output.md#targettype) (does not have an assembly manifest), was specified to [**References**](../language-reference/compiler-options/inputs.md#references). So, rather than appending an assembly to the assembly for the current program, the metadata information in output file 1 will be added to the assembly for the current program.
+ An output file (output file 1), produced in a compilation that used the **module** element of the [**OutputType**](../language-reference/compiler-options/output.md#outputtype) (does not have an assembly manifest), was specified to [**References**](../language-reference/compiler-options/inputs.md#references). So, rather than appending an assembly to the assembly for the current program, the metadata information in output file 1 will be added to the assembly for the current program.
diff --git a/docs/csharp/misc/cs1542.md b/docs/csharp/misc/cs1542.md
index 983e7f8a570d4..3fc6eaf440e76 100644
--- a/docs/csharp/misc/cs1542.md
+++ b/docs/csharp/misc/cs1542.md
@@ -12,4 +12,4 @@ ms.assetid: d7f60aa2-6645-472c-ac12-fa57a09fbd87
'dll' cannot be added to this assembly because it already is an assembly; use '/R' option instead
- The file that was referenced with the [**AddModules**](../language-reference/compiler-options/inputs.md#addmodules) compiler option was not built with **module** element of the [**TargetType** compiler option](../language-reference/compiler-options/output.md#targettype); use [**References**](../language-reference/compiler-options/inputs.md#references) to reference the file in this compilation.
+ The file that was referenced with the [**AddModules**](../language-reference/compiler-options/inputs.md#addmodules) compiler option was not built with **module** element of the [**OutputType** compiler option](../language-reference/compiler-options/output.md#outputtype); use [**References**](../language-reference/compiler-options/inputs.md#references) to reference the file in this compilation.
diff --git a/docs/csharp/misc/cs1555.md b/docs/csharp/misc/cs1555.md
index 8af501306950b..529c097365e9b 100644
--- a/docs/csharp/misc/cs1555.md
+++ b/docs/csharp/misc/cs1555.md
@@ -12,6 +12,6 @@ ms.assetid: 1919c8b8-d72c-44af-91d0-674ccde77c3f
Could not find 'class' specified for Main method
-A class was specified to the [**MainEntryPoint**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option, but the class name was not found in the source code.
+A class was specified to the [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option, but the class name was not found in the source code.
[!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)]
diff --git a/docs/csharp/misc/cs1556.md b/docs/csharp/misc/cs1556.md
index 660ed92457c66..3d4fa10918502 100644
--- a/docs/csharp/misc/cs1556.md
+++ b/docs/csharp/misc/cs1556.md
@@ -12,6 +12,6 @@ ms.assetid: 960307d2-d815-4d7a-8f96-e3e78c038ade
'construct' specified for Main method must be a valid class or struct
-The [**MainEntryPoint**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option was passed an identifier that was not a class name.
+The [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option was passed an identifier that was not a class name.
[!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)]
diff --git a/docs/csharp/misc/cs1557.md b/docs/csharp/misc/cs1557.md
index 67a1979e8108d..8789af92fd4f0 100644
--- a/docs/csharp/misc/cs1557.md
+++ b/docs/csharp/misc/cs1557.md
@@ -12,4 +12,4 @@ ms.assetid: 1615e028-aeb7-4788-bd87-8e49e502d698
Cannot use 'class' for Main method because it is in a different output file
- The [**MainEntryPoint**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option was specified for one output file in a multi-output file compilation. However, the class was not found in the source code for the /main compilation; it was found in a source code file for one of the other output files in the compilation.
+ The [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option was specified for one output file in a multi-output file compilation. However, the class was not found in the source code for the /main compilation; it was found in a source code file for one of the other output files in the compilation.
diff --git a/docs/csharp/misc/cs1558.md b/docs/csharp/misc/cs1558.md
index 72dd2d7c3a86b..453ff79131e60 100644
--- a/docs/csharp/misc/cs1558.md
+++ b/docs/csharp/misc/cs1558.md
@@ -12,7 +12,7 @@ ms.assetid: ee603d66-007e-4782-9285-7ff031975f0f
'class' does not have a suitable static Main method
-The [**MainEntryPoint**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option specified a class in which to look for a **Main** method. However, the [Main](../fundamentals/program-structure/main-command-line.md) method was not defined correctly.
+The [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option specified a class in which to look for a **Main** method. However, the [Main](../fundamentals/program-structure/main-command-line.md) method was not defined correctly.
[!INCLUDE[csharp-build-only-diagnostic-note](~/includes/csharp-build-only-diagnostic-note.md)]
diff --git a/docs/csharp/misc/cs1559.md b/docs/csharp/misc/cs1559.md
index 740923871cb21..9b552f0304cbd 100644
--- a/docs/csharp/misc/cs1559.md
+++ b/docs/csharp/misc/cs1559.md
@@ -12,4 +12,4 @@ ms.assetid: 08e6c183-4e92-44a5-99f1-4d1eef3d0a67
Cannot use 'object' for Main method because it is imported
- An invalid class was specified to the [**StartupObject**](../language-reference/compiler-options/advanced.md#mainentrypoint-or-startupobject) compiler option; the class cannot be used as a location for the [Main](../fundamentals/program-structure/main-command-line.md) method.
+ An invalid class was specified to the [**StartupObject**](../language-reference/compiler-options/advanced.md#startupobject) compiler option; the class cannot be used as a location for the [Main](../fundamentals/program-structure/main-command-line.md) method.
diff --git a/docs/csharp/misc/cs1927.md b/docs/csharp/misc/cs1927.md
index c4788aff1a0a3..705e42ab55a46 100644
--- a/docs/csharp/misc/cs1927.md
+++ b/docs/csharp/misc/cs1927.md
@@ -41,4 +41,4 @@ class ManifestWithModule
## See also
- [**Win32Manifest** (C# Compiler Options)](../language-reference/compiler-options/resources.md#win32manifest)
-- [**TargetType** module (C# Compiler Options)](../language-reference/compiler-options/output.md#targettype)
+- [**OutputType** module (C# Compiler Options)](../language-reference/compiler-options/output.md#outputtype)
diff --git a/docs/csharp/misc/cs2017.md b/docs/csharp/misc/cs2017.md
index eb6a0b3c1e400..925335e336e27 100644
--- a/docs/csharp/misc/cs2017.md
+++ b/docs/csharp/misc/cs2017.md
@@ -12,7 +12,7 @@ ms.assetid: 16fd0c3b-018f-4734-809d-8d98d05a254c
Cannot specify /main if building a module or library
- You cannot specify a main entry point when you are building a **library** [**TargetType**](../language-reference/compiler-options/output.md#targettype).
+ You cannot specify a main entry point when you are building a **library** [**OutputType**](../language-reference/compiler-options/output.md#outputtype).
The following sample generates CS2017:
diff --git a/docs/csharp/misc/cs2019.md b/docs/csharp/misc/cs2019.md
index ce7d02f2d4649..c7839b0261203 100644
--- a/docs/csharp/misc/cs2019.md
+++ b/docs/csharp/misc/cs2019.md
@@ -12,7 +12,7 @@ ms.assetid: eafd2531-8b3a-499c-9e12-a605a011396f
Invalid target type for /target: must specify 'exe', 'winexe', 'library', or 'module'
- The [**TargetType**](../language-reference/compiler-options/output.md#targettype) compiler option was used, but an invalid parameter was passed. To resolve this error, recompile the program using the form of the **/target** option that is appropriate to your output file.
+ The [**OutputType**](../language-reference/compiler-options/output.md#outputtype) compiler option was used, but an invalid parameter was passed. To resolve this error, recompile the program using the form of the **/target** option that is appropriate to your output file.
The following sample generates CS2017:
diff --git a/docs/csharp/misc/cs2022.md b/docs/csharp/misc/cs2022.md
index dcf3266a17395..d45785a9fc2ac 100644
--- a/docs/csharp/misc/cs2022.md
+++ b/docs/csharp/misc/cs2022.md
@@ -12,4 +12,4 @@ ms.assetid: d22de497-c4ef-466f-8fbc-6faba7ba5ad0
Options '/out' and '/target' must appear before source file names
- The [**-out** (Set Output Filename)](../language-reference/compiler-options/output.md#outputassembly) and [-target (Specify Output File Format)](../language-reference/compiler-options/output.md#targettype) compiler options, when specified on the command line, must precede the source code files.
+ The [**-out** (Set Output Filename)](../language-reference/compiler-options/output.md#outputassembly) and [-target (Specify Output File Format)](../language-reference/compiler-options/output.md#outputtype) compiler options, when specified on the command line, must precede the source code files.
diff --git a/docs/csharp/misc/cs3012.md b/docs/csharp/misc/cs3012.md
index caabb9801fc43..c33aace161289 100644
--- a/docs/csharp/misc/cs3012.md
+++ b/docs/csharp/misc/cs3012.md
@@ -13,7 +13,7 @@ ms.assetid: 1f7555b4-61e4-4821-85c9-586301df4c5c
You cannot specify the CLSCompliant attribute on a module that differs from the CLSCompliant attribute on the assembly
-In order for a module to be compliant with the Common Language Specification (CLS) through `[module:System.CLSCompliant(true)]`, it must be built with the **module** element of the [**TargetType**](../language-reference/compiler-options/output.md#targettype) compiler option. For more information on the CLS, see [Language independence and language-independent components](../../standard/language-independence.md).
+In order for a module to be compliant with the Common Language Specification (CLS) through `[module:System.CLSCompliant(true)]`, it must be built with the **module** element of the [**OutputType**](../language-reference/compiler-options/output.md#outputtype) compiler option. For more information on the CLS, see [Language independence and language-independent components](../../standard/language-independence.md).
## Example
diff --git a/docs/csharp/misc/cs3013.md b/docs/csharp/misc/cs3013.md
index 2a4a5424de718..b31ee476d990d 100644
--- a/docs/csharp/misc/cs3013.md
+++ b/docs/csharp/misc/cs3013.md
@@ -12,6 +12,6 @@ ms.assetid: 00b3bbe1-f2a0-465c-be0e-1af700c5753d
Added modules must be marked with the CLSCompliant attribute to match the assembly
- A module that was compiled with the **module** element of the [**TargetType**](../language-reference/compiler-options/output.md#targettype) compiler option was added to a compilation with [**AddModule**](../language-reference/compiler-options/inputs.md#addmodules). However, the module's compliance with the Common Language Specification (CLS) does not agree with the CLS state of the current compilation.
+ A module that was compiled with the **module** element of the [**OutputType**](../language-reference/compiler-options/output.md#outputtype) compiler option was added to a compilation with [**AddModule**](../language-reference/compiler-options/inputs.md#addmodules). However, the module's compliance with the Common Language Specification (CLS) does not agree with the CLS state of the current compilation.
CLS compliance is indicated with the module attribute. For example, `[module:CLSCompliant(true)]` indicates that the module is CLS compliant, and `[module:CLSCompliant(false)]` indicates that the module is not CLS compliant. The default is `[module:CLSCompliant(false)]`. For more information on the CLS, see [Language independence and language-independent components](../../standard/language-independence.md).
diff --git a/docs/csharp/misc/cs5001.md b/docs/csharp/misc/cs5001.md
index 540ab0e923f75..1de27de9f055f 100644
--- a/docs/csharp/misc/cs5001.md
+++ b/docs/csharp/misc/cs5001.md
@@ -18,7 +18,7 @@ This error occurs when no static `Main` method with a correct signature is found
If the `Main` method has an `async` modifier, make sure that the [selected C# language version](../language-reference/configure-language-version.md) is 7.1 or higher and to use `Task` or `Task` as the return type.
-The `Main` method is only required when compiling an executable file, that is, when the **exe** or **winexe** element of the [**TargetType**](../language-reference/compiler-options/output.md#targettype) compiler option is specified. The following Visual Studio project types specify one of these options by default:
+The `Main` method is only required when compiling an executable file, that is, when the **exe** or **winexe** element of the [**OutputType**](../language-reference/compiler-options/output.md#outputtype) compiler option is specified. The following Visual Studio project types specify one of these options by default:
- Console application
- ASP.NET Core application
diff --git a/docs/framework/tools/winmdexp-exe-windows-runtime-metadata-export-tool.md b/docs/framework/tools/winmdexp-exe-windows-runtime-metadata-export-tool.md
index 14415575b34b5..632f742bef8a4 100644
--- a/docs/framework/tools/winmdexp-exe-windows-runtime-metadata-export-tool.md
+++ b/docs/framework/tools/winmdexp-exe-windows-runtime-metadata-export-tool.md
@@ -27,7 +27,7 @@ winmdexp [options] winmdmodule
|Argument or option|Description|
|------------------------|-----------------|
-|`winmdmodule`|Specifies the module (.winmdobj) to be exported. Only one module is allowed. To create this module, use the `/target` compiler option with the `winmdobj` target. See [-target:winmdobj (C# Compiler Options)](../../csharp/language-reference/compiler-options/output.md#targettype) or [-target (Visual Basic)](../../visual-basic/reference/command-line-compiler/target.md).|
+|`winmdmodule`|Specifies the module (.winmdobj) to be exported. Only one module is allowed. To create this module, use the `/target` compiler option with the `winmdobj` target. See [-target:winmdobj (C# Compiler Options)](../../csharp/language-reference/compiler-options/output.md#outputtype) or [-target (Visual Basic)](../../visual-basic/reference/command-line-compiler/target.md).|
|`/docfile:` `docfile`
`/d:` `docfile`|Specifies the output XML documentation file that Winmdexp.exe will produce. In .NET Framework 4.5, the output file is essentially the same as the input XML documentation file.|
|`/moduledoc:` `docfile`
`/md:` `docfile`|Specifies the name of the XML documentation file that the compiler produced with `winmdmodule`.|
|`/modulepdb:` `symbolfile`
`/mp:` `symbolfile`|Specifies the name of the program database (PDB) file that contains symbols for `winmdmodule`.|
diff --git a/docs/fsharp/language-reference/compiler-options.md b/docs/fsharp/language-reference/compiler-options.md
index 24520a666475a..c13105387d159 100644
--- a/docs/fsharp/language-reference/compiler-options.md
+++ b/docs/fsharp/language-reference/compiler-options.md
@@ -57,7 +57,7 @@ The following table shows compiler options listed alphabetically. Some of the F#
|`--staticlink:assembly-name`|Statically links the given assembly and all referenced DLLs that depend on this assembly. Use the assembly name, not the DLL name.|
|`--subsystemversion`|Specifies the version of the OS subsystem to be used by the generated executable. Use 6.02 for Windows 8.1, 6.01 for Windows 7, 6.00 for Windows Vista. This option only applies to executables, not DLLs, and need only be used if your application depends on specific security features available only on certain versions of the OS. If this option is used, and a user attempts to execute your application on a lower version of the OS, it will fail with an error message.|
|--tailcalls[+|-]
|Enables or disables the use of the tail IL instruction, which causes the stack frame to be reused for tail recursive functions. This option is enabled by default.|
-|--target:[exe|winexe|library|module] filename
|Specifies the type and file name of the generated compiled code.- `exe` means a console application.
- `winexe` means a Windows application, which differs from the console application in that it does not have standard input/output streams (stdin, stdout, and stderr) defined.
- `library` is an assembly without an entry point.
- `module` is a .NET Framework module (.netmodule), which can later be combined with other modules into an assembly.
This compiler option is equivalent to the C# compiler option of the same name. For more information, see [/target (C# Compiler Options)](../../csharp/language-reference/compiler-options/output.md#targettype).|
+|--target:[exe|winexe|library|module] filename
|Specifies the type and file name of the generated compiled code.- `exe` means a console application.
- `winexe` means a Windows application, which differs from the console application in that it does not have standard input/output streams (stdin, stdout, and stderr) defined.
- `library` is an assembly without an entry point.
- `module` is a .NET Framework module (.netmodule), which can later be combined with other modules into an assembly.
This compiler option is equivalent to the C# compiler option of the same name. For more information, see [/target (C# Compiler Options)](../../csharp/language-reference/compiler-options/output.md#outputtype).|
|`--times`|Displays timing information for compilation.|
|`--utf8output`|Enables printing compiler output in the UTF-8 encoding.|
|`--warn:warning-level`|Sets a warning level (0 to 5). The default level is 3. Each warning is given a level based on its severity. Level 5 gives more, but less severe, warnings than level 1.
This compiler option is equivalent to the C# compiler option of the same name. For more information, see [/warn (C# Compiler Options)](../../csharp/language-reference/compiler-options/errors-warnings.md#warninglevel).|