Finding path to current Project

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.
 
P

Pete Davis

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top