// The .NET Foundation licenses this file to you under the MIT license.
using System;
+using System.IO;
using System.Runtime.Versioning;
using System.Threading;
using System.Threading.Tasks;
Logger.LogInformation("Application started. Press Ctrl+C to shut down.");
Logger.LogInformation("Hosting environment: {EnvName}", Environment.EnvironmentName);
Logger.LogInformation("Content root path: {ContentRoot}", Environment.ContentRootPath);
+ string contentRootFullPath = Path.GetFullPath(Environment.ContentRootPath);
+
+ if (contentRootFullPath.Equals(System.Environment.CurrentDirectory, StringComparison.Ordinal)
+ || contentRootFullPath.Equals(AppContext.BaseDirectory, StringComparison.Ordinal))
+ {
+ Logger.LogInformation("Current working directory is /. If Content root path is not set explicitly, then working directory is used by default.");
+ }
}
private void OnApplicationStopping()