Wanted to share brief for creating a new Azure Function 2.0 on localhost. Followed quick start wizard within Azure for steps. Initially received error message pressing F5 but able to resolve by navigate down three folders and run command manually. Root cause was local PowerShell configuration. Updating “$profile” to remove Change Directory commands (“CD C:\CODE”) resolved the F5 error with Azure function not starting.
Unable to find project root. Expecting to find one of host.json, local.settings.json in project root.
- Launch PowerShell
- Run “notepad $profile”
- Remove any “CD” commands with modify working directory
- Save and restart
- Navigate down 3 folders with cd “bin\debug\netcoreapp2.1\”
- Run “func start host”