This documentation is archived and is not being maintained.

SourceDirectories Property

Visual Studio .NET 2003

Path to use when searching for source files to use for IntelliSense. Corresponds to environment variable SOURCE.

[Visual Basic .NET]
Public Property SourceDirectories() As String
[Visual Basic 6]
Property Get SourceDirectories() As String
Property Let SourceDirectories( _
   ByVal NewValue As String _
HRESULT __stdcall get_SourceDirectories(
   /* [out, retval] */ BSTR* retVal
HRESULT __stdcall put_SourceDirectories(
   /* [in] */ BSTR NewValue
public string SourceDirectories {get; set;}
[JScript .NET]
public function get SourceDirectories() : String
public function set SourceDirectories(
   NewValue : String


The following sample code modifies the SourceDirectories 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 p As VCPlatform
        Dim x As String
        prj = DTE.Solution.Projects.Item(1).Object
        p = prj.Platforms(1)
        x = p.SourceDirectories
        p.SourceDirectories = x + ";something"
    End Sub
End Module

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

See Also

Applies To: VCPlatform Object