How to get assemblies referenced in current project in design time

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

am looking for a way, during design-time, to be able to access all
assemblies that were added as references to the currently selected project.

That would allow me, for instance, to open a control editor and populate a
list box with the names of all assemblies referenced by the project that the
control is part of.

I checked the available design-time services like ITypeResolutionService and
IReferenceService and none of them seem to be useful for that purpose.

So how I can do it?

Thanks,
Marcos
 
From an add-in that would be done with the assemblies EnvDTE.dll and
VSLangProj.dll, using the root EnvDTE.DTE object (the IDE), you get the
EnvDTE.Project, cast its Object property to VSLangProj.VSProject and then
you get the References collection.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio .NET, VB6, VB5 and VBA
You can code, design and document much faster.
Free resources for add-in developers:
http://www.mztools.com
 
Thanks. I actually found out how to do it yesterday in the web and the
solution corresponds exactly with the explanation you just gave me. I
implemented it and it worked as expected.

Thanks again,
Marcos
 
Back
Top