Reputation: 1975
I'm trying to get project directory path(My Documents\Visual Studio 2013\Projects\SmartPhoneCatalog\SmartPhoneCatalog
).
tried Directory.GetCurrentDirectory
and Enviroment.CurrentDirectory
but both return IIS Express
folder path. (C:\Program Files (x86)\IIS Express\
)
Any suggestions which method to use?
Upvotes: 3
Views: 5890
Reputation: 47375
Try AppDomain.CurrentDomain.BaseDirectory
.
If memory serves, this will get you to My Documents\Visual Studio 2013\Projects\SmartPhoneCatalog\SmartPhoneCatalog\bin
, so you may have to go up one directory from here.
Upvotes: 6