I have upgrade a .NET 6 web app to .NET 7, but now it is not taking the startup command anymore. I tried providing it in the App Service General settings and in the Azure DevOps build pipeline, but both are not taking. The log does not mention my startup command at all. When logging in via SSH I can see the environment variable PORT2 is not set. I have tried recreating the App Service, but that did not resolve the issue.
root@203286ac5aa2:/opt/startup# env | grep PORT
PORT=8080
SSH_PORT=2222
App Service General settings:
Stack settings:
Stack: .NET
Major version: .NET 7 (STS)
Minor version .NET 7 (STS)
Startup Command: dotnet Service.dll
Build pipeline task:
- task: AzureWebApp@1
inputs:
azureSubscription: "Pay-As-You-Go (86726306-bc9b-4332-adef-fc0ef60007e4)"
appType: "webAppLinux"
appName: ${<!-- -->{ parameters.appName }}
package: "extracted/api" af a
runtimeStack: "DOTNETCORE|7.0"
startUpCommand: "dotnet Service.dll"
Log:
2022-12-13T15:52:28.263709727Z: [INFO] DotNet Runtime 7.0WARNING: Expected to find only one file with extension '.runtimeconfig.json' but found 3
2022-12-13T15:52:28.263715126Z: [INFO] WARNING: Found files: 'Extensions.Tests.runtimeconfig.json, Service.runtimeconfig.json, Test.runtimeconfig.json'
2022-12-13T15:52:28.263720126Z: [INFO] WARNING: To fix this issue you can set the startup command to point to a particular startup file