C# - how to get path to directory where Program.cs is on Windows from Program.cs
Due to the fact that one can only get the path to the .NET executing assembly, and the assembly can be stored any where on disk, it is impossible to get the path to any source file of the assembly. Unless, of course, you are executing from the /bin path that is created in the project.
Once the assembly is moved, you have no hope of using its current path to trace back to the path of the source files used to create that assembly.