I have this code to load a config file and read all the values and it works fine when running the application but of course fails on team city because the appdomain\'s base
string baseDirectory=Application.StartupPath.Split(Path.DirectorySeparatorChar)[0];
Application startup path will return the path where exe is kept, we will split this using "\" and get the base directory as "C:" for example,