VCPlatform.ExcludeDirectories Property


Gets or sets a path to exclude when searching for files while building a Visual C++ project.

Namespace:   Microsoft.VisualStudio.VCProjectEngine
Assembly:  Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)

string ExcludeDirectories { get; set; }

Property Value

Type: System.String

String containing a list of directories that are not to be searched.

By default in Visual C++ 2010, this property does not inherit from parent or project defaults. To inherit defaults when you set an exclude path, append the project $(ExcludePath) macro to the path.

The following demonstration code excludes path C:\a and the inherited parent or project default path.

VCProject^ project=(VCProject^)m_dtTest->DTE->Solution->Item(1)->Object;
IVCCollection^ plats = (IVCCollection^)project->Platforms;
VCPlatform^ platform = (VCPlatform^)plats->Item(1);
platform->ExcludeDirectories = "C:\a";$(ExcludePath)
Return to top