internal static void GetLocation(string textFileName, int stackIndex, out Assembly executingAssembly, out string location)
{
StackTrace stack = new StackTrace();
StackFrame frame = stack.GetFrame(stackIndex);
MethodBase method = frame.GetMethod();
Type type = method.ReflectedType;
executingAssembly = type.Assembly; //Assembly.GetExecutingAssembly();
string pathToDots = textFileName.Replace("\\", ".");
location = string.Format("{0}.{1}", executingAssembly.GetName().Name, pathToDots);
}