azure-powershell
azure-powershell copied to clipboard
Implement proper assembly isolation to play nice with `vscode-powershell`
Description
According to vscode-powershell maintainers, Azure PowerShell does not "implement assembly isolation correctly across the board".
This can cause assembly conflict issues that vscode-powershell can't solve easily from their context.
I don't have deep knowledge about this, I just want my authoring experience where Microsoft owns every part of the stack fixed.
Here are some resources on how, using assembly load context (ALC):
- https://www.youtube.com/watch?v=__J7b84BAmQ
- https://pipe.how/get-assemblyloadcontext
- https://github.com/daxian-dbw/PowerShell-ALC-Samples
- https://learn.microsoft.com/en-us/powershell/scripting/dev-cross-plat/resolving-dependency-conflicts
- https://learn.microsoft.com/en-us/dotnet/api/system.runtime.loader.assemblyloadcontext?view=net-8.0
Here is more context:
- 2020-10-15: https://github.com/PowerShell/vscode-powershell/issues/3012
- 2023-09-05: https://github.com/PowerShell/vscode-powershell/issues/4727
- 2024-09-30: https://github.com/PowerShell/vscode-powershell/issues/5053
Feature request
Use AssemblyLoadContext for all assembly dependencies used by any Az module.