Path to LocalAppData in ASP.Net Core application
<p>I have an ASP.Net Core application, and for the current purposes I've got to use LocalAppData.</p>

<p>Usually I would write <code>Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData)</code>, but unfortunately it's not working with ASP.Net Core.</p>

<p>Could anyone help me with this?</p>

<p><strong>UPDATE</strong></p>

<p>Thanks to Adem Caglin, I've found the solution.</p>

<p>The code I use:</p>

<p><code>Environment.GetEnvironmentVariable(
            RuntimeInformation.IsOSPlatform(OSPlatform.Windows) ? "LocalAppData" : "Home");</code></p>