According to the recommendations, in the folder with the program there should be no files with settings, cache and other files that are constantly changing. It is better to use the following directories:
Environment.GetFolderPath(ApplicationData) - files tied to a user walk around the domain (for example, settings)Environment.GetFolderPath(LocalApplicationData) - files tied to the user and computer, do not walk across the domain (for example, cache)Environment.GetFolderPath(CommonApplicationData) - files common to several applications on the computer, do not walk across the domain (for example, common to several configuration programs)
To all the folders above, you should add a subpath of the "YourCompany \ YourApplication" type.
If you insist on using the path to the executable file, you can use Assembly.GetExecutingAssembly().CodeBase .