-
Notifications
You must be signed in to change notification settings - Fork 505
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PNP.PowerShell scripts not working in VS Code with PowerShell extension #5032
Comments
Please see the pinned issue #3510 |
@nirmala24 I know you noted you read it, but to expand, because of the way PnP.PowerShell doesn't isolate all of its dependencies, it causes conflicts with the pieces that make vscode work. This has to be fixed by PnP.PowerSehell. |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
I do not believe this was resolved. This is still an outstanding issue for me. This started happening in the past couple of days. |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
@JustinGrote - Thanks for the response. Any idea on how or when this will be fixed. Or any workarounds other than the ones mentioned in #3510. Or any other alternate editors other than VS code for PnP.PowerShell |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
@nirmala24 I opened a relevant issue in the repo: pnp/powershell#4192, you can comment and follow the status there. |
This issue has been labeled as resolved, please verify the provided fix (or other reason). |
Cannot confirm the issue, debugging works fine: Using [email protected] , PnP PowerShell 2.9.9, VS Code 1.92.2, PSVersion 7.4.5 . The HTTP error 404 means the list with name "Shared Documents" doesn't exist. It wounds unrelated to .NET isolation. |
Prerequisites
Summary
I am having issues running PnP PowerShell scripts in VS Code with PowerShell extension. Using normal PowerShell (pwsh), all PnP commands work as expected. The issue is only occurring while debugging the .ps1 script files using the PowerShell extension in VS Code.
Executing the script with the PowerShell extension Integrated console terminal are running as expected, but unable to debug the same .ps1 script with pnp powershell commands as none of the CMDlets are working.
I have read an issue about the PowerShell extension issue with VS Code(#3510), but I am having issues using debugging the scripts with PowerShell extension.
Details of my environment:
PnP.PowerShell-Module Version 2.9.0
PnP.PowerShell 7.4.5
VSCode version
1.92.2
fee1edb8d6d72a0ddff41e5f71a671c23ed924b9
x64
PowerShell extension for VS Code
ms-vscode.?[7mpowershell?[[email protected]
This was working fine couple of days before
PowerShell Version
Visual Studio Code Version
Extension Version
Steps to Reproduce
Install PnP.PowerShell module
Install VS Code
Get the PowerShell extension for VS Code
Open a file and save it as .ps1 with the below pnp PowerShell commands.
Connect-PnPOnline -site "https://abc.sharepoint.com/sites/testsite1" -Interactive
$DL = Get-PnPList -Identity "Shared Documents"
Debug the saved .ps1 with the PowerShell extension integrated console as the selected terminal
Visuals
Logs
No response
The text was updated successfully, but these errors were encountered: