Uygulama klasörü yolunu almanın bazı yolları olduğunu görüyorum:
Application.StartupPathSystem.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().Location)AppDomain.CurrentDomain.BaseDirectorySystem.IO.Directory.GetCurrentDirectory()Environment.CurrentDirectorySystem.IO.Path.GetDirectoryName( System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase)System.IO.Path.GetDirectory(Application.ExecutablePath)
Duruma bağlı olarak en iyi yol nedir?
IHostEnvironment.ContentRootPath, enjekte edilen bir IHostEnvironmentbağımlılıktan erişilen (başka yararlı şeyler içeren) var.