Export (0) Print
Expand All
Expand Minimize

ManagedExtensions Property

Visual Studio .NET 2003

Specifies that this configuration uses Managed Extensions for C++. Exposes the functionality of the C++ compiler's /clr option.

[Visual Basic .NET]
Public Property ManagedExtensions() As Boolean
[Visual Basic 6]
Property Get ManagedExtensions() As Boolean
Property Let ManagedExtensions( _
   ByVal NewValue As Boolean _
HRESULT __stdcall get_ManagedExtensions(
   /* [out, retval] */ VARIANT_BOOL* retVal
HRESULT __stdcall put_ManagedExtensions(
   /* [in] */ VARIANT_BOOL NewValue
public bool ManagedExtensions {get; set;}
[JScript .NET]
public function get ManagedExtensions() : Boolean
public function set ManagedExtensions(
   NewValue : Boolean


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 will override the ManagedExtensions property on the configuration.


The following sample 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

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCConfiguration Object | VCStyleSheet Object

© 2014 Microsoft