poshbotio / PoshBot

Powershell-based bot framework
MIT License
536 stars 108 forks source link

FunctionApp creation not working as expected #221

Closed bobalob closed 3 years ago

bobalob commented 3 years ago

Function App shows an error relating to unknown language [dotnet]. Also the Function does not run as expected, complaining about Push-OutputBinding not being a known command.

Current Behavior

When running the following command, the FunctionApp is created but the PowerShell commandlet Push-OutputBinding is not available and there is a warning in the Overview section relating to [dotnet]

az functionapp create --resource-group <RESOURCE-GROUP-NAME> --name <FUNCTION-APP-NAME> \
  --storage-account <STORAGE-ACCOUNT-NAME> --consumption-plan-location <REGION> \
  --deployment-source-url "https://github.com/poshbotio/TeamsWebhook"

Possible Solution

add the following to the az functionapp create command

--runtime powershell
devblackops commented 3 years ago

Thanks for reporting this @bobalob.

I haven't tested this yet, but it looks like behavior change in az functionapp. The docs were written when v1 functions were still the default.

devblackops commented 3 years ago

@bobalob Docs have been updated to include --runtime powershell and --functions-version 3.