| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…oad(byte[])' and 'Assembly.LoadFile'
| /// </summary> | ||
| private static IEnumerable<Assembly> GetPSVisibleAssemblies() | ||
| { | ||
| const string IndividualAssemblyLoadContext = "System.Runtime.Loader.IndividualAssemblyLoadContext"; |
There was a problem hiding this comment.
My concern is that IndividualAssemblyLoadContext is internal class and .Net is free to change the name.
Maybe more reliable to use an assembly context name ("Assembly.Load(byte[], ...)" and "Assembly.LoadFile({0})"). It is public contract and has one prefix Assembly.Load for both.
Sorry, something went wrong.
There was a problem hiding this comment.
Any one can create a ALC instance with the name "Assembly.Load(byte[], ...)" or "Assembly.LoadFile(".
It's less reliable to depend on the name than the type. They can change the type name, but I think that possibility is very low, and we have test to catch the failure if the type name really changes.
Sorry, something went wrong.
|
🎉v7.1.0-preview.2 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
|
🎉v7.0.1 has been released which incorporates this pull request.:tada: Handy links: |
Sorry, something went wrong.
…oadFile' (PowerShell#12203) * Fix regression: pwsh should discover assemblies loaded by 'Assembly.Load(byte[])' and 'Assembly.LoadFile'
…oadFile' (PowerShell#12203) * Fix regression: pwsh should discover assemblies loaded by 'Assembly.Load(byte[])' and 'Assembly.LoadFile'
| Back | FazBrowse Home | New Git URL |
PR Summary
Fix #12052
Fix a regression in PS 7.0 introduced by #11088
PowerShell should discover assemblies loaded by Assembly.Load(byte[]) and Assembly.LoadFile as in prior versions.
Assemblies loaded by Assembly.Load(byte[]) and Assembly.LoadFile are placed in special AssemblyLoadContext instances of the type System.Runtime.Loader.IndividualAssemblyLoadContext. PowerShell should return assemblies from those load context instances.
Also include a minor change to ignore the .ionide folders, which are auto-generated by VS Code C# extension to hold symbol caches.
/cc Patrick Meinecke (@SeeminglyScience)
PR Checklist