简体   繁体   中英

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.

Problem I also need to display the physical path of the files containing the Members And starting from the Project name. I have searched and figured out that this could be achievable using the library of 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.Project.FullName
  • In some cases (WebSite projects) using the EnvDTE.Project.Properties collection, with a property name "FullPath".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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