I was trying to find a way to use appdata path as my environment.currentdurectory which means I want to run the c# application from appdata folder and in my project I always used environment.currentdirectory.
I couldn't find a way that I can set appdata path in app config and later replace environment.curentdirectory by appdata path...
PS:.
1) I want to set my programs data path as appdata
2) my project code is set to use environment.currentdirectory
3) I don't want to replace environment.currentdirectory by going each line by line
Target .Net framework 4
Have you tried doing this via the app domain.
See:
https://learn.microsoft.com/en-us/dotnet/api/system.appdomain.basedirectory?view=netframework-4.7.2