Hi when running my unit test I\'m wanting to get the directory my project is running in to retrieve a file.
Say I have a Test project named MyProject. Test I run:
Further to @abhilash's comment.
This works in my EXE's, DLL's and when tested from a different UnitTest project in both Debug or Release modes:
var dirName = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location.Replace("bin\\Debug", string.Empty));