I have recently switched computers (both win 10)- and on the new one azure (serverless) functions are not working properly. I am using VS Code, and these functions are written in Python.
This problem is when executing them locally, I do not know if there is a problem when deployed - because I will not attempt to redeploy until the present problem is fixed.
The problem seems to be due to the fact that the VS Code installation on the new machine is configured to use powershell as the shell used when the functions are started locally. In this mode the virtual environment is not activated - because of powershell permission/security issues around running the .venv activate script. Since the virtual environment is not activated, this means that none of the installed site-packages are available to the functions - and everything fails.
I dont want to fix that issue with powershell, I want to setup vs code so that it never uses powershell unless absolutely necessary - I think it is just dreadful. Unfortunately almost all the documentation on how to reset the configuration - back to using cmd.exe - seems to be out of date, configuration settings deprecated and moved, etc.
I have tried switching the default shell back to cmd.exe - but when the azure functions launch locally - it still runs operations using powershell. I have also tried editing the settings file "terminal.integrated.profiles.windows" element - to get rid of powershell, and use cmd.exe - but this doesn't work either.
is there some simple way to fix this - at the moment I am not able to get any azure functions working - I just want powershell gone.