VCALinkTool.ToolPath 属性
定义
重要
一些信息与预发行产品相关,相应产品在发行之前可能会进行重大修改。 对于此处提供的信息,Microsoft 不作任何明示或暗示的担保。
获取指定工具的路径。
public:
property System::String ^ ToolPath { System::String ^ get(); };
public:
property Platform::String ^ ToolPath { Platform::String ^ get(); };
[System.Runtime.InteropServices.DispId(2)]
public string ToolPath { [System.Runtime.InteropServices.DispId(2)] [System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)] get; }
[<System.Runtime.InteropServices.DispId(2)>]
[<get: System.Runtime.InteropServices.DispId(2)>]
[<get: System.Runtime.InteropServices.TypeLibFunc(System.Runtime.InteropServices.TypeLibFuncFlags.FNonBrowsable)>]
member this.ToolPath : string
Public ReadOnly Property ToolPath As String
属性值
指定工具的路径。
- 属性
示例
' Add a reference to Microsoft.VisualStudio.VCProjectEngine and have a
' Visual C++ project loaded before running this example.
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 VCALinkTool
Dim msg As String
prj = DTE.Solution.Projects.Item(1).Object
cfgs = prj.Configurations
cfg = cfgs.Item(1)
tool = cfg.Tools("VCAlinkTool")
msg += "Tool kind: " & tool.ToolKind & vbCr
msg += "Tool name: " & tool.ToolName & vbCr
msg += "Tool path: " & tool.ToolPath
MsgBox(msg)
End Sub
End Module
注解
有关如何编译和运行此示例的信息,请参阅 如何:编译项目模型扩展性的示例代码 。