Skip to content

Commit ff3d102

Browse files
authored
Merge pull request #3939 from corob-msft/docs/corob/clr-advanced-change
Update Advanced prop page and C1107
2 parents 70fe3b2 + fee8a59 commit ff3d102

2 files changed

Lines changed: 22 additions & 6 deletions

File tree

docs/build/reference/advanced-property-page.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
description: "Use the Advanced property page in Visual Studio 2019 to set various properties for C++ projects."
33
title: "Advanced Property Page (Project)"
4-
ms.date: 05/28/2021
5-
f1_keywords: ["VC.Project.VCConfiguration.TargetExt", "VC.Project.VCConfiguration.DeleteExtensionsOnClean", "VC.Project.VCConfiguration.BuildLogFile", "VC.Project.VCConfiguration.PreferredToolArchitecture", "VC.Project.VCConfiguration.UseDebugLibraries", "VC.Project.VCConfiguration.EnableUnitySupport", "VC.Project.VCConfiguration.CopyLocalDeploymentContent", "VC.Project.VCConfiguration.CopyLocalProjectReference", "VC.Project.VCConfiguration.CopyLocalDebugSymbols", "VC.Project.VCConfiguration.CopyCppRuntimeToOutputDir", "VC.Project.VCConfiguration.useOfMfc", "VC.Project.VCConfiguration.CharacterSet", "VC.Project.VCConfiguration.WholeProgramOptimization", "VC.Project.VCConfiguration.VCToolsVersion", "VC.Project.VCConfiguration.LLVMToolsVersion", "VC.Project.VCConfiguration.ManagedExtensions", "VC.Project.TargetFrameworkVersion", "VC.Project.VCConfiguration.EnableManagedIncrementalBuild"]
4+
ms.date: 11/22/2021
5+
f1_keywords: ["VC.Project.VCConfiguration.TargetExt", "VC.Project.VCConfiguration.DeleteExtensionsOnClean", "VC.Project.VCConfiguration.BuildLogFile", "VC.Project.VCConfiguration.PreferredToolArchitecture", "VC.Project.VCConfiguration.UseDebugLibraries", "VC.Project.VCConfiguration.EnableUnitySupport", "VC.Project.VCConfiguration.CopyLocalDeploymentContent", "VC.Project.VCConfiguration.CopyLocalProjectReference", "VC.Project.VCConfiguration.CopyLocalDebugSymbols", "VC.Project.VCConfiguration.CopyCppRuntimeToOutputDir", "VC.Project.VCConfiguration.useOfMfc", "VC.Project.VCConfiguration.CharacterSet", "VC.Project.VCConfiguration.WholeProgramOptimization", "VC.Project.VCConfiguration.VCToolsVersion", "VC.Project.VCConfiguration.LLVMToolsVersion", "VC.Project.VCConfiguration.ManagedExtensions", "VC.Project.TargetFrameworkVersion", "VC.Project.VCConfiguration.EnableManagedIncrementalBuild", "VC.Project.VCConfiguration.ManagedAssembly"]
66
---
77
# Advanced Property Page
88

@@ -112,4 +112,8 @@ In managed projects, specifies the .NET framework version to target.
112112

113113
For managed projects, this option enables detection of external visibility when you generate assemblies. If a change to a managed project isn't visible to other projects, dependent projects aren't rebuilt. Managed incremental builds can dramatically improve build times in solutions that include managed projects.
114114

115+
### Enable CLR Support for Individual Files
116+
117+
This option sets a `ManagedAssembly` build property that enables building only some files in the project as managed code. You must set **Enable CLR Support for Individual Files** to **Yes** if some but not all of your project files are built as managed code. This property is only available in projects that use the v143 or later toolset in Visual Studio 2022 and later versions.
118+
115119
::: moniker-end
Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,27 @@
11
---
22
description: "Learn more about: Fatal Error C1107"
33
title: "Fatal Error C1107"
4-
ms.date: "11/04/2016"
4+
ms.date: 11/22/2021
55
f1_keywords: ["C1107"]
66
helpviewer_keywords: ["C1107"]
77
ms.assetid: 541a4d9f-10bc-4dd8-b68e-15e548f3dc0a
88
---
99
# Fatal Error C1107
1010

11-
could not find assembly 'file': please specify the assembly search path using /AI or by setting the LIBPATH environment variable
11+
> could not find assembly '*file*': please specify the assembly search path using `/AI` or by setting the `LIBPATH` environment variable
1212
13-
A metadata file was passed to a [#using](../../preprocessor/hash-using-directive-cpp.md) directive that the compiler was unable to locate.
13+
A metadata file was passed to a [`#using`](../../preprocessor/hash-using-directive-cpp.md) directive that the compiler was unable to locate.
1414

15-
LIBPATH, which is described in the topic for `#using`, and the [/AI](../../build/reference/ai-specify-metadata-directories.md) compiler option allow you to specify directories in which the compiler will look for referenced metadata files.
15+
LIBPATH, which is described in the article for `#using`, and the [`/AI`](../../build/reference/ai-specify-metadata-directories.md) compiler option allow you to specify directories in which the compiler will look for referenced metadata files.
16+
17+
This error can occur when you retarget a project to use the Visual Studio 2022 toolset. Projects created by older versions of the toolset set properties `TargetRuntime=Managed` and `TargetFrameworkVersion=4.0` by default. Starting in Visual Studio 2022, .NET Framework 4.0 isn't installed, and projects default to `TargetRuntime=Native`.
18+
19+
If you retarget a project that used [`/clr`](../../build/reference/clr-common-language-runtime-compilation.md) for some or all of its source files, starting in Visual Studio 2022 you must set certain properties to build your project. If all the source files in your project are compiled as managed code, use the **`/clr`** compiler option for your project. If only some files in your project use **`/clr`**, set the `ManagedAssembly=true` property in your project properties.
20+
21+
To set these properties in the IDE, open the Property Pages dialog for your project. Select the **Configuration Properties** > **Advanced** page.
22+
23+
- To set **`/clr`** for the entire project, change the **Common Language Runtime Support** property. You may also need to set the **.NET Target Framework Version** property. Choose **Okay** or **Apply** to save your changes.
24+
25+
- If you only use **`/clr`** for some of the files in your project, set the **Enable CLR Support for individual files** property to **Yes**. This value sets the `ManagedAssembly=true` property in your project properties. Choose **Okay** or **Apply** to save your changes.
26+
27+
For more information about the options on the **Advanced** property page, see [Advanced Property Page](../../build/reference/advanced-property-page.md).

0 commit comments

Comments
 (0)