আমি দেখতে পাচ্ছি অ্যাপ্লিকেশন ফোল্ডারের পাথ পাওয়ার কিছু উপায় রয়েছে:
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উপর নির্ভরশীলতার মাধ্যমে অ্যাক্সেস করা হয়েছে (যার মধ্যে অন্যান্য দরকারী জিনিস রয়েছে)।