How do I find out what directory my console app is running in with C#?
Use AppContext.BaseDirectory for .net5.
AppContext.BaseDirectory