vs2003 - project - working directory

  • Thread starter Thread starter news.microsoft.com
  • Start date Start date
N

news.microsoft.com

Hi NG,

I want to start my vs2003-project in the solutionfolder of the project and
not in /bin/debug because there are external files i wand to load. If i goto
project-prefenences-Debug-"Working Directory" an add a relative path like
"." i get at runtime different working paths in my app
(System.IO.Directory.GetCurrentDirectory()) depending on how i have started
vs2003 (directly or doubleclick sln-file).
I don't want to use absolute paths because im running cvs.
any idea to fix the problem?

Thanks,
Benjamin
 
Hi,

When accessing the files, try using Application.StartupPath rather
than System.IO.Directory.GetCurrentDirectory() and leave
WorkingDirectory field of Project Properties blank.

Good Luck,
Dincer
 
Back
Top