I've created an WFA app and I decided to test it on my PC so I made an installator for it. My programme is collaborating with .txt file inside the same folder so in my code I get its execution path by AppDomain.CurrentDomain.BaseDirectory and add to it "myTxt.txt" to gain txt path. Then I read get its content via File.ReadAllLines() to my string array.
string path = AppDomain.CurrentDomain.BaseDirectory;
string text = String.Concat(path,"mytxt.txt");
string[] content = File.ReadAllLines("mytxt.txt") // relative path
And here comes the problem. Whenever my programme is set in "Program files" I can open .txt but no content is loaded to the array. Otherwise when it is set in Program files(x86) everything works great. Why is that happening? How shall I solve the problem?