I have developed an add-in that displays all the files/folders in a particular directory. What i would like to do is, if i see a .sln file in the directory, on double click would like to open the solution in the current open Visual Studio solution explorer. I am using Visual Studio 2015.
System.Type type = Type.GetTypeFromProgID("VisualStudio.DTE.14.0");
EnvDTE.DTE dte = (EnvDTE.DTE)System.Activator.CreateInstance(type);
dte.MainWindow.Visible = true;
dte.Solution.Open(path);
This particular code opens the solution in a fresh Visual Studio and not the current.
Thanks a lot in advance.