S
Sebastien Lange
Hi,
While designing a windows form, one of my controls needs to know the
solution path.
So I'm getting an instance of DTE (see hereafter) and call the Solution
property, then its FileName.
It's working fine until you have several VS.NET opened, then it returns the
path of the solution of the first openened VS.NET, not the current one
anymore...
Is it a bug, is there a workaround? (I'm using VS.NET 2003 Pro)
Sebastien
EnvDTE.DTE dte =
(EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualSt
udio.DTE.7.1"); // Get an instance of the currently running Visual Studio
..NET IDE.
MessageBox.Show(dte.Solution.FileName);
While designing a windows form, one of my controls needs to know the
solution path.
So I'm getting an instance of DTE (see hereafter) and call the Solution
property, then its FileName.
It's working fine until you have several VS.NET opened, then it returns the
path of the solution of the first openened VS.NET, not the current one
anymore...
Is it a bug, is there a workaround? (I'm using VS.NET 2003 Pro)
Sebastien
EnvDTE.DTE dte =
(EnvDTE.DTE)System.Runtime.InteropServices.Marshal.GetActiveObject("VisualSt
udio.DTE.7.1"); // Get an instance of the currently running Visual Studio
..NET IDE.
MessageBox.Show(dte.Solution.FileName);