Skip to content

Fix the loader to work on PowerShell 7.0 too (.NET 3.1) - #588

Merged
Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:v2from
daxian-dbw:fix
Sep 7, 2022
Merged

Aditya Patwardhan (adityapatwardhan) merged 1 commit into
PowerShell:v2from
daxian-dbw:fix

Conversation

@daxian-dbw

@daxian-dbw Dongbo Wang (daxian-dbw) commented Sep 7, 2022 •

Copy link
Copy Markdown
Member

PR Summary

Fix the loader to work on PowerShell 7.0 too (.NET 3.1).
The check Environment.Version.Major > 4 was not accurate to reflect whether we are running in .NET Core, for example, it fails when running in PowerShell 7.0.
Fix it by checking if the AssemblyLoadContext type is available at runtime.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants