मैं देखता हूं कि एप्लिकेशन फ़ोल्डर पथ प्राप्त करने के कुछ तरीके हैं:
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)
स्थिति के आधार पर सबसे अच्छा तरीका क्या है?
IHostEnvironment.ContentRootPath, इंजेक्शन की IHostEnvironmentनिर्भरता (जिसमें अन्य उपयोगी चीजें हैं) के माध्यम से पहुँचा जा सकता है ।