Skip to content

Commit 4507e69

Browse files
author
Colin Robertson
authored
Merge pull request #2560 from MicrosoftDocs/master637395056651031011
Repo sync for protected CLA branch
2 parents 7367d6d + 96ba828 commit 4507e69

File tree

6 files changed

+600
-597
lines changed

6 files changed

+600
-597
lines changed

docs/build/reference/clr-common-language-runtime-compilation.md

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
---
22
title: "/clr (Common Language Runtime compilation)"
33
description: "Use the Microsoft C++ compiler option /clr to compile C++/CLI and C++ code as managed code."
4-
ms.date: 10/25/2020
4+
ms.date: 10/27/2020
55
f1_keywords: ["/CLR", "VC.Project.VCNMakeTool.CompileAsManaged", "VC.Project.VCCLCompilerTool.CompileAsManaged"]
66
helpviewer_keywords: ["cl.exe compiler, common language runtime option", "-clr compiler option [C++]", "clr compiler option [C++]", "/clr compiler option [C++]", "Managed Extensions for C++, compiling", "common language runtime, /clr compiler option"]
77
ms.assetid: fec5a8c0-40ec-484c-a213-8dec918c1d6c
88
---
99
# `/clr` (Common Language Runtime Compilation)
1010

11-
Enables applications and components to use features from the common language runtime (CLR).
11+
Enables applications and components to use features from the common language runtime (CLR) and enables C++/CLI compilation.
1212

1313
## Syntax
1414

@@ -21,7 +21,15 @@ One or more of the following comma-separated arguments.
2121

2222
- none
2323

24-
With no options, **`/clr`** creates metadata for the application. The metadata can be consumed by other CLR applications, and enables the application to consume types and data in the metadata of other CLR components. For more information, see [Mixed (Native and Managed) Assemblies](../../dotnet/mixed-native-and-managed-assemblies.md).
24+
With no options, **`/clr`** creates metadata for the component. The metadata can be consumed by other CLR applications, and enables the component to consume types and data in the metadata of other CLR components. For more information, see [Mixed (Native and Managed) Assemblies](../../dotnet/mixed-native-and-managed-assemblies.md).
25+
26+
- **`NetCore`**
27+
28+
**`/clr:NetCore`** creates metadata and code for the component using the latest cross-platform .NET framework, also known as .NET Core. The metadata can be consumed by other .NET Core applications. And, the option enables the component to consume types and data in the metadata of other .NET Core components.
29+
30+
- **`nostdlib`**
31+
32+
Instructs the compiler to ignore the default *`\clr`* directory. The compiler produces errors if you include multiple versions of a DLL, such as System.dll. This option lets you specify the specific framework to use during compilation.
2533

2634
- **`pure`**
2735

@@ -43,15 +51,11 @@ One or more of the following comma-separated arguments.
4351

4452
- **`initialAppDomain`**
4553

46-
Enables a C++/CLI application to run on version 1 of the CLR. An application that's compiled by using **`initialAppDomain`** shouldn't be used by an application that uses ASP.NET because it's not supported in version 1 of the CLR.
47-
48-
- **`nostdlib`**
49-
50-
Instructs the compiler to ignore the default *`\clr`* directory. The compiler produces errors if you include multiple versions of a DLL, such as System.dll. This option lets you specify the specific framework to use during compilation.
54+
**`initialAppDomain` is obsolete**. Enables a C++/CLI application to run on version 1 of the CLR. An application that's compiled by using **`initialAppDomain`** shouldn't be used by an application that uses ASP.NET because it's not supported in version 1 of the CLR.
5155

5256
## Remarks
5357

54-
Managed code is code that can be inspected and managed by the CLR. Managed code can access managed objects. For more information, see [`/clr `Restrictions](clr-restrictions.md).
58+
*Managed code* is code that can be inspected and managed by the CLR. Managed code can access managed objects. For more information, see [`/clr` Restrictions](clr-restrictions.md).
5559

5660
For information about how to develop applications that define and consume managed types in C++, see [Component Extensions for Runtime Platforms](../../extensions/component-extensions-for-runtime-platforms.md).
5761

@@ -95,10 +99,13 @@ Use ildasm.exe to view metadata.
9599

96100
1. Set the **Configuration** dropdown to **All configurations**, and set the **Platform** dropdown to **All Platforms**.
97101

98-
1. Select the **Configuration Properties** > **Advanced** page.
102+
1. Select the **Configuration Properties** > **C/C++** > **General** page.
99103

100104
1. Modify the **Common Language Runtime Support** property. Choose **OK** to save your changes.
101105

106+
> [!NOTE]
107+
> In the Visual Studio IDE, the **`/clr`** compiler option can be individually set on the **Configuration Properties** > **C/C++** > **General** page of the Property Pages dialog. However, we recommend you use a CLR template to create your project. It sets all of the properties required for successful creation of a CLR component. Another way to set these properties is to use the **Common Language Runtime Support** property on the **Configuration Properties** > **Advanced** page of the Property Pages dialog. This property sets all the other CLR-related tool options at once.
108+
102109
### To set this compiler option programmatically
103110

104111
- See <xref:Microsoft.VisualStudio.VCProjectEngine.VCCLCompilerTool.CompileAsManaged>.

docs/build/reference/custom-build-step-property-page-general.md

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
---
22
title: "Custom Build Step Property Page: General"
3-
ms.date: "11/04/2016"
3+
description: "This article describes the properties available on the Custom Build Step page in the Property Pages dialog."
4+
ms.date: 10/27/2020
45
f1_keywords: ["VC.Project.VCCustomBuildStep.AdditionalInputs", "VC.Project.VCCustomBuildStep.CustomBuildAfterTargets", "VC.Project.VCCustomBuildStep.CustomBuildBeforeTargets", "VC.Project.VCCustomBuildStep.Outputs", "VC.Project.VCCustomBuildStep.Message", "VC.Project.VCCustomBuildStep.Command"]
56
helpviewer_keywords: ["project properties, custom build step", "custom build step (general)"]
67
ms.assetid: bd319741-0491-46c4-a428-7c61b4b46a02
78
---
89
# Custom Build Step Property Page: General
910

10-
For each combination of project configuration and target platform in your project, you can specify a custom step to be performed when the project is built.
11+
For each project configuration and target platform combination in your project, you can specify a custom step to execute when the project is built.
1112

1213
For the Linux version of this page, see [Custom Build Step Properties (Linux C++)](../../linux/prop-pages/custom-build-step-linux.md).
1314

14-
## UIElement List
15+
## General page
1516

1617
- **Command Line**
1718

@@ -31,17 +32,17 @@ For the Linux version of this page, see [Custom Build Step Properties (Linux C++
3132

3233
- **Execute After and Execute Before**
3334

34-
These options define when the custom build step is run in the build process, relative to the listed targets. The most commonly listed targets are BuildGenerateSources, BuildCompile, and BuildLink, because they represent the major steps in the build process. Other often-listed targets are Midl, CLCompile, and Link.
35+
These options define when the custom build step is run in the build process, relative to the listed targets. The most commonly listed targets are `BuildGenerateSources`, `BuildCompile`, and `BuildLink`, because they represent the major steps in the build process. Other often-listed targets are `Midl`, `CLCompile`, and `Link`.
3536

3637
- **Treat Output As Content**
3738

38-
This option is only meaningful for Universal Windows Platform or Windows Phone apps, which include all content files in the .appx package.
39+
This option is only meaningful for Universal Windows Platform or Windows Phone apps, which include all content files in the *`.appx`* package.
3940

4041
### To specify a custom build step
4142

42-
1. On the menu bar, choose **Project**, **Properties**. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
43+
1. On the menu bar, choose **Project** > **Properties**. For more information, see [Set C++ compiler and build properties in Visual Studio](../working-with-project-properties.md).
4344

44-
1. In the **Property Pages** dialog box, navigate to the **Configuration Properties**, **Custom Build Step**, **General** page.
45+
1. In the **Property Pages** dialog box, navigate to the **Configuration Properties** > **Custom Build Step** > **General** page.
4546

4647
1. Modify the settings.
4748

0 commit comments

Comments
 (0)