Właściwość VCCLCompilerTool.UndefinePreprocessorDefinitions —
Zwraca lub ustawia wartość, która określa, że jeden lub więcej preprocesora undefines.UndefinePreprocessorDefinitionseksponuje funkcjonalność kompilator C++ / /U U, (Usuń definicję symbole) opcji i kompilator MIDL Strony właściwości MIDL: Zaawansowane opcji.
Przestrzeń nazw: Microsoft.VisualStudio.VCProjectEngine
Zestaw: Microsoft.VisualStudio.VCProjectEngine (w Microsoft.VisualStudio.VCProjectEngine.dll)
Składnia
'Deklaracja
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)
Wartość właściwości
Typ: System.String
Ciąg określający jedną lub więcej preprocesora undefines.
Przykłady
Zobacz Jak: kompilowania przykładowy kod do projektu modelu rozszerzalności informacje na temat skompilować i uruchomić ten przykład.
Poniższy przykład modyfikuje przez kompilator UndefinePreprocessorDefinitions właściwość w zintegrowane środowisko programistyczne (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
Zabezpieczenia programu .NET Framework
- Pełne zaufanie do bezpośredniego wywołującego. Tego elementu członkowskiego nie można używać w kodzie częściowo zaufanym. Aby uzyskać więcej informacji, zobacz Przy użyciu bibliotek z częściowo zaufanego kodu..