VCConfiguration.OutputDirectory 属性

定义

获取或设置要在其中放置输出的目录。 默认目录为项目目录。

public:
 property System::String ^ OutputDirectory { System::String ^ get(); void set(System::String ^ value); };
public:
 property Platform::String ^ OutputDirectory { Platform::String ^ get(); void set(Platform::String ^ value); };
[System.Runtime.InteropServices.DispId(702)]
public string OutputDirectory { [System.Runtime.InteropServices.DispId(702)] get; [System.Runtime.InteropServices.DispId(702)] set; }
[<System.Runtime.InteropServices.DispId(702)>]
[<get: System.Runtime.InteropServices.DispId(702)>]
[<set: System.Runtime.InteropServices.DispId(702)>]
member this.OutputDirectory : string with get, set
Public Property OutputDirectory As String

属性值

String

要在其中放置输出的目录。

属性

示例

有关如何编译和运行此示例的信息,请参阅 如何:编译项目模型扩展性的示例代码

下面的示例在 VCConfiguration OutputDirectory 集成开发环境 (IDE) 中修改对象的属性:

' 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  

注解

向导将设置此属性。 不要将项目目录用于项目输出。

适用于