Condividi tramite


Proprietà VCMidlTool.EnableErrorChecks

Ottiene o imposta un valore che indica l'opzione di controllo degli errori. Se si seleziona Personalizza, durante la compilazione ricorrono solo le opzioni di controllo degli errori selezionate.

Spazio dei nomi:  Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

Sintassi

'Dichiarazione
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)

Valore proprietà

Tipo: Microsoft.VisualStudio.VCProjectEngine.midlErrorCheckOption
Enumerazione midlErrorCheckOption.

Note

EnableErrorChecks espone la funzionalità dell'opzione /error MIDL.

Utilizzare l'enumerazione di midlErrorCheckOption per modificare il valore di questa proprietà.

Vedere Procedura: compilare codice di esempio per l'Extensibility del modello di progetto per informazioni su come compilare ed eseguire l'esempio.

Esempi

Nell'esempio riportato di seguito la proprietà di EnableErrorChecks nell'ambiente di sviluppo integrato (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

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCMidlTool Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCProjectEngine