Share via


VCCLCompilerTool.CompileAsManaged-Eigenschaft

Ruft einen Wert ab, der Compileroptionen angibt, oder legt diesen fest.

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

Syntax

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

Eigenschaftswert

Typ: Microsoft.VisualStudio.VCProjectEngine.compileAsManagedOptions
Eine compileAsManagedOptions-Enumeration.

Hinweise

Verwenden Sie die compileAsManagedOptions-Enumeration legen Sie den Wert dieser Eigenschaft ändern.

Beispiele

Weitere Informationen finden Sie unter Gewusst wie: Kompilieren von Beispielcode für die Erweiterbarkeit von Projektmodellen Informationen zum Ändern dieses Beispiel kompiliert und ausgeführt wird.

Im folgenden Beispiel wird die CompileAsManaged-Eigenschaft in der integrierten Entwicklungsumgebung (IDE):

' 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

.NET Framework-Sicherheit

Siehe auch

Referenz

VCCLCompilerTool Schnittstelle

Microsoft.VisualStudio.VCProjectEngine-Namespace