VCLinkerTool.AdditionalLibraryDirectories 属性

获取或设置一个或多个附加路径(特定于配置),用于搜索库。

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

语法

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

属性值

类型:System.String
表示路径名称的字符串。

备注

AdditionalLibraryDirectories 公开链接器的 /LIBPATH(附加的 Libpath) 选项和管理员的 管理库 选项的功能。

有效路径名的示例是“c:\additionaldirs”。使用分号分隔多个路径的列表。

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

示例

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

' Macro code.
' Before running, load a Visual C++ project and add a reference to 
' Microsoft.VisualStudio.VCProjectEngine
Imports EnvDTE
Imports EnvDTE80
Imports System.Diagnostics
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")
        MsgBox("Additional Lib Directory: " & _
        tool.AdditionalLibraryDirectories)
        tool.AdditionalLibraryDirectories = "c:\temp"
        MsgBox("Additional Lib Directory: " & _
        tool.AdditionalLibraryDirectories)
    End Sub
End Module

.NET Framework 安全性

请参见

参考

VCLinkerTool 接口

Microsoft.VisualStudio.VCProjectEngine 命名空间

AdditionalLibraryDirectories