Closed JustinGrote closed 2 months ago
Note that I cannot confirm the issue reported at https://github.com/PowerShell/vscode-powershell/issues/5032 , debugging works fine for me
Using ms-vscode.powershell@2024.2.2 , PnP PowerShell 2.9.9, VS Code 1.92.2, PSVersion 7.4.5 .
The issue reported on VS Code shows HTTP error 404 which sounds unrelated to .NET isolation. The user most likely expects a list that doesn't exist.
https://github.com/pnp/powershell/blob/e06c687263f07f3d2908970a2cac42ece6f71d46/src/Commands/Base/DependencyAssemblyLoadContext.cs#L12
per https://github.com/PowerShell/vscode-powershell/issues/3510#issuecomment-1438960031, this does not appear to be isolating dependencies as expected, especially key ones that conflict with the Visual Studio Code PowerShell extension. As a result, several users are unable to run or debug PnP.PowerShell in Visual Studio Code but can get it to run otherwise. https://github.com/PowerShell/vscode-powershell/issues/5032
Please update the assembly load context and relevant references to properly isolate in PS7+. @jborean93 has an excellent loader example here: https://github.com/jborean93/PowerShell-ALC/blob/main/ALCLoader/README.md