Condividi tramite


Proprietà VCMidlTool.EnableErrorChecks

Ottiene o l'opzione di controllo degli errori.Se si seleziona Personalizzati, solo le opzioni selezionate di controllo degli errori si verificano durante la compilazione.

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
In midlErrorCheckOption enumerazione.

Note

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

utilizzare midlErrorCheckOption enumerazione 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 seguente viene modificato EnableErrorChecks proprietà nell'ambiente di sviluppo (IDE) 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