Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
Export (0) Print
Expand All
Expand Minimize

CompileAsManaged Property

Visual Studio .NET 2003

Uses the .NET runtime services, incompatible with any runtime checks. Exposes the functionality of the compiler's /clr option.

[Visual Basic .NET]
Public Property CompileAsManaged() As compileAsManagedOptions
[Visual Basic 6]
Property Get CompileAsManaged() As compileAsManagedOptions
Property Let CompileAsManaged( _
   ByVal NewValue As compileAsManagedOptions _
HRESULT __stdcall get_CompileAsManaged(
   /* [out, retval] */ compileAsManagedOptions* retVal
HRESULT __stdcall put_CompileAsManaged(
   /* [in] */ compileAsManagedOptions NewValue
public compileAsManagedOptions CompileAsManaged {get; set;}
[JScript .NET]
public function get CompileAsManaged() : compileAsManagedOptions
public function set CompileAsManaged(
   NewValue : compileAsManagedOptions


Use the compileAsManagedOptions enumeration to change the value of this property.


The following sample code modifies the CompileAsManaged property in the development environment:

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

Public Module Module1
    Sub Test()
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCCLCompilerTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCCLCompilerTool")
        tool.CompileAsManaged = compileAsManagedOptions.managedMetaData
    End Sub
End Module

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

See Also

Applies To: VCCLCompilerTool Object

© 2015 Microsoft