You want to get the path of the executable at runtime, it would be like this:
string projectPath = Path.GetDirectoryName(Assembly.GetEntryAssembly().Location);
After I ran it the result was this:
C:\\Users\\<user>\\source\\repos\\App7\\App7\\bin\\x64\\Debug\\net8.0-windows10.0.19041.0\\win-x64\\AppX