简体   繁体   English

如何使用EnvDTE获取项目的路径

[英]How to get the path of a project using EnvDTE

Big picture: I am working on an Extension Tools for Visual Studio 2015. Currently I have a Member Finder windows form responsible to display all the Methods and Properties inside a project. 大图:我正在使用Visual Studio 2015的扩展工具。目前,我有一个“成员查找器”窗口窗体,负责显示项目中的所有方法和属性。

Problem I also need to display the physical path of the files containing the Members And starting from the Project name. 问题我还需要从项目名称开始显示包含Member And的文件的物理路径。 I have searched and figured out that this could be achievable using the library of EnvDTE. 我已经搜索并发现使用EnvDTE库可以实现这一目标。 I have also worked on the library but unfortunately could not manage the issue. 我也曾在图书馆工作,但不幸的是无法解决问题。 Here is a picture of the Member Finder window which needs the path the member at the end of the each list box item. 这是“成员查找器”窗口的图片,该窗口需要每个列表框项目末尾的成员路径。

Member Finder Without a Path 没有路径的会员查找器

在此处输入图片说明

Any idea kindly appreciated. 任何想法表示赞赏。

Using the automation model (EnvDTE) you can get the file name with path of an EnvDTE.Project using: 使用自动化模型(EnvDTE),您可以使用以下命令获取带有EnvDTE.Project路径的文件名:

  • EnvDTE.Project.FullName EnvDTE.Project.FullName
  • In some cases (WebSite projects) using the EnvDTE.Project.Properties collection, with a property name "FullPath". 在某些情况下(WebSite项目),使用带有属性名称“ FullPath”的EnvDTE.Project.Properties集合。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM