Compartir a través de


VCCLCompilerTool.UndefinePreprocessorDefinitions (Propiedad)

Obtiene o establece un valor que especifica una o más definiciones del preprocesador. UndefinePreprocessorDefinitions expone la funcionalidad de la opción /U, /u (Anular la definición de símbolos) del compilador de C++ y la opción Páginas de propiedades MIDL: Avanzadas del compilador de MIDL.

Espacio de nombres:  Microsoft.VisualStudio.VCProjectEngine
Ensamblado:  Microsoft.VisualStudio.VCProjectEngine (en Microsoft.VisualStudio.VCProjectEngine.dll)

Sintaxis

'Declaración
Property UndefinePreprocessorDefinitions As String
string UndefinePreprocessorDefinitions { get; set; }
property String^ UndefinePreprocessorDefinitions {
    String^ get ();
    void set (String^ value);
}
abstract UndefinePreprocessorDefinitions : string with get, set
function get UndefinePreprocessorDefinitions () : String 
function set UndefinePreprocessorDefinitions (value : String)

Valor de propiedad

Tipo: String
Cadena que especifica la anulación de una o más definiciones del preprocesador.

Ejemplos

Vea Cómo: Compilar el código de ejemplo de extensibilidad del modelo de proyecto para obtener información sobre cómo compilar y ejecutar este ejemplo.

En el ejemplo siguiente se modifica la propiedad UndefinePreprocessorDefinitions del compilador en el entorno de desarrollo integrado (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
        Dim oldUndefs As String
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCCLCompilerTool")
        oldUndefs = tool.UndefinePreprocessorDefinitions
        tool.UndefinePreprocessorDefinitions = "_DEBUG;" + oldUndefs
        MsgBox(tool.UndefinePreprocessorDefinitions)
    End Sub
End Module

Seguridad de .NET Framework

Vea también

Referencia

VCCLCompilerTool Interfaz

Microsoft.VisualStudio.VCProjectEngine (Espacio de nombres)