Udostępnij za pośrednictwem


VCProjectConfigurationProperties.ManagedExtensions Property

Definition

Specifies that this configuration uses Visual C++. Exposes the functionality of the C++ compiler's /clr (Common Language Runtime Compilation) option.

public:
 property Microsoft::VisualStudio::VCProject::compileAsManagedOptions ManagedExtensions { Microsoft::VisualStudio::VCProject::compileAsManagedOptions get(); void set(Microsoft::VisualStudio::VCProject::compileAsManagedOptions value); };
public:
 property Microsoft::VisualStudio::VCProject::compileAsManagedOptions ManagedExtensions { Microsoft::VisualStudio::VCProject::compileAsManagedOptions get(); void set(Microsoft::VisualStudio::VCProject::compileAsManagedOptions value); };
[System.Runtime.InteropServices.DispId(740)]
public Microsoft.VisualStudio.VCProject.compileAsManagedOptions ManagedExtensions { [System.Runtime.InteropServices.DispId(740)] get; [System.Runtime.InteropServices.DispId(740)] set; }
[<System.Runtime.InteropServices.DispId(740)>]
[<get: System.Runtime.InteropServices.DispId(740)>]
[<set: System.Runtime.InteropServices.DispId(740)>]
member this.ManagedExtensions : Microsoft.VisualStudio.VCProject.compileAsManagedOptions with get, set
Public Property ManagedExtensions As compileAsManagedOptions

Property Value

A compileAsManagedOptions enumeration.

Attributes

Examples

[Visual Basic]

The following example code modifies the VCConfiguration object's ManagedExtensions property in the development environment:

' add reference to Microsoft.VisualStudio.VCProjectEngine  
Imports EnvDTE  
Imports Microsoft.VisualStudio.VCProjectEngine  

Public Module Module1  
    Sub Test()  
        Dim MyString As String  
        Dim prj As VCProject  
        Dim cfgs As IVCCollection  
        Dim cfg As VCConfiguration  
        Dim MyDbg As VCDebugSettings  
        prj = DTE.Solution.Projects.Item(1).Object  
        cfgs = prj.Configurations  
        cfg = cfgs.Item(1)  
        cfg.ManagedExtensions = True  
    End Sub  
End Module  

Remarks

If you set this property instead of the compiler tool's CompileAsManaged property, then other, related properties for the linker and <xref:Microsoft.VisualStudio.VCProjectEngine.VCWebServiceProxyGeneratorTool> are set for you as well. Setting the compiler's CompileAsManaged property directly overrides the ManagedExtensions property on the configuration.

See How to: Compile Example Code for Project Model Extensibility for information on how to compile and run this sample.

Applies to