-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
win32: add fallback to environment vars for system folder #109673
base: main
Are you sure you want to change the base?
Conversation
Tagging subscribers to this area: @dotnet/area-system-runtime |
7581043
to
da047d7
Compare
Implement fallback to environment variables for system folders in NanoServer, ensuring correct paths when SHGetKnownFolderPath fails.
@@ -28,7 +27,7 @@ public void ShouldUseEnvironmentVariableToGetDefaultLocation() | |||
result.Should().Contain(PackagesPath); | |||
} | |||
|
|||
[ConditionalFact(typeof(PlatformDetection), nameof(PlatformDetection.IsNotWindowsNanoServer))] // https://github.com/dotnet/runtime/issues/21430 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ViktorHofer @akoeplinger I removed this condition, and it's now passing where it was failing before: link to comment. I didn’t update other environment tests since they compare values against win32 SHGetFolderPathW
, which returns a general error (-2147467259) on nano server
src/libraries/System.Private.CoreLib/src/System/Environment.Win32.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Environment.Win32.cs
Outdated
Show resolved
Hide resolved
src/libraries/System.Private.CoreLib/src/System/Environment.Win32.cs
Outdated
Show resolved
Hide resolved
I am leaving it to @dotnet/area-system-runtime owners to do the final signoff and merge. |
Implement fallback to environment variables for system folders in NanoServer, ensuring correct paths when SHGetKnownFolderPath fails.
in base nanoserver image, all values are returning empty
both
SHGetFolderPathW
andSHGetKnownFolderPath
fail with error -2147467259.environment variables in the base image:
docker run --rm mcr.microsoft.com/windows/nanoserver:ltsc2022 cmd /c "set"