How can I list references for a selected project? And add a new reference to a dll on disk?

有帮助吗?

解决方案

You can either:

  1. manipulate the project xml directly or
  2. you can use the automation model

The automation model, is the better of the two, the code project article below shows you examples of getting and adding references to a project and the first article shows you how you can use the DTE from outside of Visual Studio itself.

This should give you a head start..

http://www.mztools.com/articles/2005/MZ2005005.aspx

http://www.codeproject.com/KB/macros/EnvDTE.aspx

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top