Compartir a través de


VCConfiguration.ManagedExtensions Property

Gets or sets a configuration that uses Visual C++. ManagedExtensions exposes the functionality of the C++ compiler's /clr (Common Language Runtime Compilation) option.

Namespace:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Syntax

'Declaration
Property ManagedExtensions As compileAsManagedOptions
compileAsManagedOptions ManagedExtensions { get; set; }
property compileAsManagedOptions ManagedExtensions {
    compileAsManagedOptions get ();
    void set (compileAsManagedOptions value);
}
abstract ManagedExtensions : compileAsManagedOptions with get, set
function get ManagedExtensions () : compileAsManagedOptions 
function set ManagedExtensions (value : compileAsManagedOptions)

Property Value

Type: Microsoft.VisualStudio.VCProjectEngine.compileAsManagedOptions
A compileAsManagedOptions enumeration.

Remarks

If you set this property instead of the compiler tool's CompileAsManaged property, then other, related properties for the linker and VCWebServiceProxyGeneratorTool will be set for you as well. Setting the compiler's CompileAsManaged property directly overrides the ManagedExtensions property on the configuration.

Examples

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

The following example modifies the VCConfiguration object's ManagedExtensions property in the integrated development environment (IDE):

' 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

.NET Framework Security

See Also

Reference

VCConfiguration Interface

Microsoft.VisualStudio.VCProjectEngine Namespace