共用方式為


VCALinkTool.ToolPath 屬性

取得指定之工具的路徑。

命名空間:  Microsoft.VisualStudio.VCProjectEngine
組件:  Microsoft.VisualStudio.VCProjectEngine (在 Microsoft.VisualStudio.VCProjectEngine.dll 中)

語法

'宣告
ReadOnly Property ToolPath As String
string ToolPath { get; }
property String^ ToolPath {
    String^ get ();
}
abstract ToolPath : string with get
function get ToolPath () : String

屬性值

型別:System.String
指定之工具的路徑。

備註

如需如何編譯與執行此範例的詳細資訊,請參閱HOW TO:編譯專案模型擴充性的範例程式碼

範例

' 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

.NET Framework 安全性

請參閱

參考

VCALinkTool 介面

Microsoft.VisualStudio.VCProjectEngine 命名空間