tags:

views:

1350

answers:

1

Instead of running an external program with its path hardcoded, I would like to get the current Project Dir. I'm calling an external program using a process in the custom task.

How would I do that? AppDomain.CurrentDomain.BaseDirectory just gives me the location of VS 2008.

+1  A: 

You can try one of this two methods.

string startupPath = System.IO.Directory.GetCurrentDirectory();

string startupPath = Environment.CurrentDirectory;

Tell me, which one seems to you better

DaDa
Environment.CurrentDirectory is the one I'm looking for. Thanks.
seanlinmt