I try get my project diretory with GetCurrentDirectory() method, but returns AppData\Local\temp diretory.
I tried use AppContext.BaseDirectory, this worked but property returns C:\\projectName\\projectName\\bin\\Debug\\
, I want only C:\\projectName\\projectName\\
I also tried
string currentPath = findCurrentPath.Replace("\\projectName\\bin\\Debug\\", "");
archivePath = $@"{currentPath}\Image_Senarios_projectName\{imageName}";
It works in my computer, but this project run in multiple computers and on one of the computers this method returns
"C:\Jenkins\workspace_crm_aut\5.3.59\CrmAutomacao\Web\Automacao\projectName\projectName\bin\Release\\"
So I tried it
string findCurrentPath = Directory.GetParent(Directory.GetCurrentDirectory()).Parent.FullName;
but it's returned C:\Users\nameUser\AppData