This documentation is archived and is not being maintained.

WorkingDirectory Property

Visual Studio .NET 2003

The debugger's working directory. By default, the directory containing the .vcproj file.

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

Example

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

' add reference to Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports Microsoft.VisualStudio.VCProjectEngine

Public Module Module1
    Sub Test()
        Dim mystring As String
        Dim prj As VCProject
        Dim cfgs, tools As IVCCollection
        Dim cfg As VCConfiguration
        Dim tool As VCDebugSettings
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.DebugSettings
        tool.WorkingDirectory = "c:\"
    End Sub
End Module

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

See Also

Applies To: VCDebugSettings Object

Show: