microsoftgraph / microsoftgraph/msgraph-sdk-powershell
Implement proper assembly isolation to play nice with `vscode-powershell`
@timayabi2020 is already working on this.
Since Nov 21, 2024.
- Dominant language
- C#
- Stars
- 898
- Forks
- 230
- Avg merge
- 2d 5h
- Merged PRs (30d)
- 31
Description
Is your feature request related to a problem? Please describe the problem.
According to vscode-powershell maintainers, Azure PowerShell (and I assume Microsoft.Graph too as I see similar problems with it) 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
Here are other related issues:
- 2023-07-11: https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2148
- 2023-07-31: https://github.com/Azure/azure-powershell/issues/22449
- 2023-11-07: https://github.com/microsoft/Microsoft365DSC/issues/3867
- 2023-11-09: https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2424
- 2024-02-13: https://github.com/microsoftgraph/msgraph-sdk-powershell/issues/2587
Describe the solution you'd like.
Find out if anything can be done here to make Microsoft.Graph modules play nice with vscode-powershell.
Edit: Use AssemblyLoadContext for all assembly dependencies loaded by any Microsoft.Graph module.
Additional context?
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.