VCPlatform::ExcludeDirectories Property
Visual Studio 2015
Gets or sets a path to exclude when searching for files while building a Visual C++ project.
Assembly: Microsoft.VisualStudio.VCProjectEngine (in Microsoft.VisualStudio.VCProjectEngine.dll)
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)
Show: