Pretty straight-forward, but don't really know if it's even feasible. Basically I'd like to have a winform (NOT a plugin to VS) that retrieves a list of of solutions that are currently loaded in open instances of Visual Studio.
EDIT: To clarify per comments below, I'm looking for the loaded solutions full path (e.g., C:\projects\myrandomproject.sln
You can enumerate the running instances of Visual Studio through the running object table (ROT). See IRunningObjectTable
and GetRunningObjectTable
.
You can then get a reference to the DTE2 object for each running instance using the identifier from the ROT.
Use DTE2.Solution
. You can get its path from its FullName
property.