I have an ASP.Net Core application, and for the current purposes I've got to use LocalAppData.
Usually I would write Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)
, but unfortunately it's not working with ASP.Net Core.
Could anyone help me with this?
UPDATE
Thanks to Adem Caglin, I've found the solution.
The code I use:
Environment.GetEnvironmentVariable(
RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "LocalAppData" : "Home");