Proprietà VCCLCompilerTool.WarningLevel

Ottiene o imposta un valore che rappresenta quanto il compilatore controlla la presenza di costrutti potenzialmente sospetti.WarningLevel espone la funzionalità del compilatore C++ /w, /Wn, /WX, /Wall, /wln, /wdn, /wen, /won (Livello avvisi) opzione e il compilatore MIDL /w, /Wn, /WX, /Wall, /wln, /wdn, /wen, /won (Livello avvisi) opzione.

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

Sintassi

'Dichiarazione
Property WarningLevel As warningLevelOption
warningLevelOption WarningLevel { get; set; }
property warningLevelOption WarningLevel {
    warningLevelOption get ();
    void set (warningLevelOption value);
}
abstract WarningLevel : warningLevelOption with get, set
function get WarningLevel () : warningLevelOption
function set WarningLevel (value : warningLevelOption)

Valore proprietà

Tipo: Microsoft.VisualStudio.VCProjectEngine.warningLevelOption
In warningLevelOption valore di enumerazione.

Note

utilizzare warningLevelOption enumerazione per modificare il valore di WarningLevel proprietà.

Esempi

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

Nell'esempio seguente viene modificato il compilatore WarningLevel proprietà nell'ambiente di sviluppo (IDE) integrato (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.WarningLevel = warningLevelOption.warningLevel_0
    End Sub
End Module

Sicurezza di .NET Framework

Vedere anche

Riferimenti

VCCLCompilerTool Interfaccia

Spazio dei nomi Microsoft.VisualStudio.VCProjectEngine