I think you have to go to the Visual Studio IDE automation interfaces
(EnvDTE.DTE) to get this.
I found this code in MSDN (sorry about the VB code, too lazy to translate):
Imports VSLangProj
Sub ListReferences()
' Retrieve the VSProject object.
Dim theVSProject As VSProject = _
CType(DTE.Solution.Projects.Item(1).Object, VSProject)
' Retrieve the references collection.
Dim refs As References = theVSProject.References
' Create a string list of the reference names.
Dim refList As String = ""
Dim aRef As Reference
For Each aRef In refs
refList &= aRef.Identity & ControlChars.CrLf
Next
MsgBox(refList)
End Sub
I think this code is for an add-in, however you can obtain the DTE from any
designer/control using GetService:
EnvDTE.DTE dte = (EnvDTE.DTE) Component.Site.GetService(typeof(EnvDTE.DTE));
I hope this helps.

Signature
Francisco Padron
www.chartfx.com
>I am looking for a way, during design-time, to be able to access all
> assemblies that were added as references to the currently selected
[quoted text clipped - 13 lines]
> Thanks,
> Marcos
mnowosad - 23 May 2005 18:54 GMT
Thanks for the answer. I actually had already found a similar code in the web
and it worked as expected. However, you gave me a better way to access the
DTE through the designer. I originally was making this Interop COM call:
EnvDTE.DTE dte = (EnvDTE.DTE)
System.Runtime.InteropServices.Marshal.GetActiveObject("VisualStudio.DTE.7.1");
Instead, after your suggestion, I am using this code, which is much more
compliant to the .NET Component design-time framework:
EnvDTE.DTE dte = (EnvDTE.DTE) Component.Site.GetService(typeof(EnvDTE.DTE));
Thanks again,
Marcos
> I think you have to go to the Visual Studio IDE automation interfaces
> (EnvDTE.DTE) to get this.
[quoted text clipped - 41 lines]
> > Thanks,
> > Marcos