In WorkerService File generation not working only for Linux .Net Core
问题 I have to create a text file on linux when the service is starting. I tried to keep IsOSPlatform to recognize OS and based on it, I have written code to create a text file for logs. Below is the code which not generating the file only for linux , for windows it creates a file. public static void Main(string[] args) { bool isLinux = System.Runtime.InteropServices.RuntimeInformation .IsOSPlatform(OSPlatform.Linux); if(isLinux) { string sourceFile = System.IO.Path.Combine("~", "MyLog", "Config