-
Notifications
You must be signed in to change notification settings - Fork 134
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
V3 Functions project fails to launch with debugger because of PowerShell execution policy #1678
Comments
@ankitkumarr @ahmelsayed @soninaren any ideas on this one? Is there some PowerShell script that isn't getting signed for v3? |
hmm, I don't think there is anything special to v3 here. @kprpg does this work with npm installed v2? |
@ahmelsayed -- we just had someone hit this during OGF run. Did we ever get to the bottom of this? What is func.ps1 -- is that something for VS Code? |
I have just hit this too. Brand new Windows 10 machine, with Visual Studio Code installed and only Azure Functions v3 installed. Following these steps https://docs.microsoft.com/en-us/azure/azure-functions/functions-run-local#create-func using Visual Studio Code version info
If I then run Actually, I was using the Terminal directly in Visual Studio Code and this error still shows. If I do this in the Windows 10 Terminal, I do not see this error. Obviously this means that if I try debug and run in Visual Studio Code. This error prevents me from starting the host. Running this in the Visual Studio Code terminal shows execution policies were not set up.
To get this to work. I had to run PowerShell as an Administrator and run |
Filed Azure/azure-functions-core-tools#1821 to track this on the core tools side |
I started running into this issue after installing the latest VS Code update:
Fixed it by running the following in PowerShell NOT as an Administrator |
Perfect Solution, Thank you Dear |
Repro steps:
Executing task: func host start <
func : File C:\Users\gpillai\AppData\Roaming\npm\func.ps1 cannot be loaded. The file C:\Users\gpillai\AppData\Roaming\npm\func.ps1 is not digitally signed. You cannot run this script on the current system. For more
information about running scripts and setting execution policy, see about_Execution_Policies at https:/go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:1
The terminal process terminated with exit code: 1
Action: azureFunctions.pickProcess
Error type: Error
Error Message: Failed to start debugging. Task "host start" failed with exit code "1".
Version: 0.20.0
OS: win32
Product: Visual Studio Code
Product Version: 1.40.0
Language: en
Call Stack
The text was updated successfully, but these errors were encountered: