VCLinkerTool.OutputFile 属性

重写默认输出文件名称;默认名称基于命令行上的第一个 .lib 或 .obj 名称。

命名空间:  Microsoft.VisualStudio.VCProjectEngine
程序集:  Microsoft.VisualStudio.VCProjectEngine(在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

语法

声明
Property OutputFile As String
string OutputFile { get; set; }
property String^ OutputFile {
    String^ get ();
    void set (String^ value);
}
abstract OutputFile : string with get, set
function get OutputFile () : String 
function set OutputFile (value : String)

属性值

类型:String
一个表示默认输出文件的名称的字符串。

备注

OutputFile 公开链接器的选项、/OUT(输出文件名) 管理员的选项、生成导入库和导出文件 BSCMake 工具的选项的功能 BSCMAKE 选项

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

示例

下面的示例在集成开发环境 (IDE) 中修改链接器的 OutputFile 属性:

' 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 tool As VCLinkerTool
        prj = DTE.Solution.Projects.Item(1).Object
        cfgs = prj.Configurations
        cfg = cfgs.Item(1)
        tool = cfg.Tools("VCLinkerTool")
        tool.OutputFile = "$(ProjectName).x"
    End Sub
End Module

.NET Framework 安全性

请参阅

参考

VCLinkerTool 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间