Share via


VCMidlTool.EnableErrorChecks-Eigenschaft

Ruft Fehlerüberprüfungsoptionen ab oder legt diese fest.Wenn Sie Benutzerdefiniert auswählen, werden während der Kompilierung nur ausgewählte Fehlerüberprüfungsoptionen ausgeführt.

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

Syntax

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

Eigenschaftswert

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

Hinweise

EnableErrorChecks macht die Funktionen der Option /error MIDL.

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

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.

Beispiele

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

[Visual Basic]

' 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 VCMidlTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCMIDLTool")
        tool.EnableErrorChecks = midlErrorCheckOption.midlEnableAll
    End Sub
End Module

.NET Framework-Sicherheit

Siehe auch

Referenz

VCMidlTool Schnittstelle

Microsoft.VisualStudio.VCProjectEngine-Namespace