Export (0) Print
Expand All
Expand Minimize

OutputDirectory Property

Visual Studio .NET 2003

Specifies directory to place output; by default, uses the project directory.

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


Wizards will set this property. Do not use the project directory for the project outputs.


The following sample code modifies the VCConfiguration object's OutputDirectory 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
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        cfg.OutputDirectory = "\test"
    End Sub
End Module

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

See Also

Applies To: VCConfiguration Object | VCMidlTool Object | VCStyleSheet Object

© 2014 Microsoft