Finding path to current Project

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

Guest

Hi, is there a way to get the directory of the current C# Project to be used for by an addin. When I do the Directory.getCurrentDirectory(), it sends back a reference to the IDE (C:\Program Files\Microsoft Visual Studio.NET 2003\), but I want the path to the current project, such as D:\VS.NET Projects\MyProject1\. Thanks for the help in advance

I already tried using System.Reflection.Assembly.GetExecutingAssembly().Location, but this returns the path to the addin. The addin needs to be able to get the path of the project or solution that is currently open.
 
Really, you'll find better help on the yahoo group VSNETADDIN for add-in
stuff:

http://groups.yahoo.com/group/vsnetaddin/

Basically, though, the Fullname property of the Project object provides the
path and filename for the project file, so you can parse the path out of
that.

Pete
--
http://www.petedavis.net
Keith La Force said:
Hi, is there a way to get the directory of the current C# Project to be
used for by an addin. When I do the Directory.getCurrentDirectory(), it
sends back a reference to the IDE (C:\Program Files\Microsoft Visual
Studio.NET 2003\), but I want the path to the current project, such as
D:\VS.NET Projects\MyProject1\. Thanks for the help in advance.
I already tried using
System.Reflection.Assembly.GetExecutingAssembly().Location, but this returns
the path to the addin. The addin needs to be able to get the path of the
project or solution that is currently open.
 
Back
Top