You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// Logic taken from https://github.com/dotnet/runtime/blob/dc5a6c8be1644915c14c4a464447b0d54e223a46/src/libraries/Microsoft.Extensions.Hosting/src/HostingHostBuilderExtensions.cs#L209-L227
247
247
248
248
// If we're running anywhere other than C:\Windows\system32, we default to using the CWD for the ContentRoot.
249
-
// However, since many things like Windows services and MSIX installers have C:\Windows\system32 as there CWD which is not likely
250
-
// to really be the home for things like appsettings.json, we skip changing the ContentRoot in that case. The non-"default" initial
251
-
// value for ContentRoot is AppContext.BaseDirectory (e.g. the executable path) which probably makes more sense than the system32.
249
+
// However, since many things like Windows services and MSIX installers have C:\Windows\system32 as their CWD, which is not likely
250
+
// to be the home for things like appsettings.json, we skip changing the ContentRoot in that case. The non-"default" initial
251
+
// value for ContentRoot is AppContext.BaseDirectory (e.g. the executable path) which probably makes more sense than system32.
252
252
253
253
// In my testing, both Environment.CurrentDirectory and Environment.SystemDirectory return the path without
254
254
// any trailing directory separator characters. I'm not even sure the casing can ever be different from these APIs, but I think it makes sense to
0 commit comments