This documentation is archived and is not being maintained.

GeneratePreprocessedFile Property

Visual Studio .NET 2003

Specifies the preprocessing option for this configuration. Exposes the functionality of the compiler's /EP and /P options.

[Visual Basic .NET]
Public Property GeneratePreprocessedFile() As preprocessOption
[Visual Basic 6]
Property Get GeneratePreprocessedFile() As preprocessOption
Property Let GeneratePreprocessedFile( _
   ByVal NewValue As preprocessOption _
HRESULT __stdcall get_GeneratePreprocessedFile(
   /* [out, retval] */ preprocessOption* retVal
HRESULT __stdcall put_GeneratePreprocessedFile(
   /* [in] */ preprocessOption NewValue
public preprocessOption GeneratePreprocessedFile {get; set;}
[JScript .NET]
public function get GeneratePreprocessedFile() : preprocessOption
public function set GeneratePreprocessedFile(
   NewValue : preprocessOption


Use the preprocessOption enumeration to change the value of this property.


The following sample code modifies the GeneratePreprocessedFile property in the development environment:

' 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.GeneratePreprocessedFile = preprocessOption.preprocessYes
    End Sub
End Module

See Samples for Project Model Extensibility for information on how to compile and run this sample.

See Also

Applies To: VCCLCompilerTool Object