We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The check for .NET core is implemented as this:
public static bool IsNetCore { get; } = RuntimeInformation.FrameworkDescription.StartsWith(".NET Core", StringComparison.Ordinal);
But in .NET 5.0 the framework description no longer includes the word "Core". For example, in pwsh 7.1 preview 3, this is the framework description:
.NET 5.0.0-preview.4.20251.6
This makes EditorExtensionServiceProvider.LoadAssemblyInPsesLoadContext load the specified assembly in the default ALC, breaking ESCS:
EditorExtensionServiceProvider.LoadAssemblyInPsesLoadContext
public Assembly LoadAssemblyInPsesLoadContext(string assemblyPath) { if (!VersionUtils.IsNetCore) { return Assembly.LoadFrom(assemblyPath); } return EditorExtensionServiceProvider.LoadAssemblyInPsesAlc(assemblyPath); }
The text was updated successfully, but these errors were encountered:
I always thought that check was suspicious...
Sorry, something went wrong.
Looks like Platform.IsCoreCLR wasn't introduced until PowerShell Core... so... what about the negative check?:
Platform.IsCoreCLR
!RuntimeInformation.FrameworkDescription.StartsWith(".NET Framework", StringComparison.Ordinal);
PR out for this one with a move of our tests to PS7 and PS7.1 :)
Successfully merging a pull request may close this issue.
The check for .NET core is implemented as this:
But in .NET 5.0 the framework description no longer includes the word "Core". For example, in pwsh 7.1 preview 3, this is the framework description:
This makes
EditorExtensionServiceProvider.LoadAssemblyInPsesLoadContext
load the specified assembly in the default ALC, breaking ESCS:The text was updated successfully, but these errors were encountered: