Azure-cli: az webapp up -n MyApp => unable to publish to Linux App Service

Created on 11 Feb 2020  路  8Comments  路  Source: Azure/azure-cli

az feedback auto-generates most of the information requested below, as of CLI version:

azure-cli 2.0.81
command-modules-nspkg 2.0.3
core 2.0.81
nspkg 3.0.4
telemetry 1.0.4

Describe the bug
az webapp fails to deploy .NET Core API as Linux App Service

To Reproduce
az webapp up -n MyApp

Renders:
The webapp MyApp is a Linux app. The code detected at 'C:\Projects\MyApp' will default to ''. Please create a new app to continue this operation.

Expected behavior
Publish it or If something is missing, the error should mention how to either force or create a setting that informs explicity [az webapp] that this an application that should be deployed as a Linux App Service

Environment summary
Tested on both PowerShell Core 6.2.4 and Ubuntu 18.04

Additional context
I am able to publish from Visual Studio and VS-Code with no issues

Service Attention Web Apps

Most helpful comment

@atlemagnussen

try az webapp up --os-type linux

All 8 comments

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI @antcp

Thanks for the feedback! We are routing this to the appropriate team for follow-up. cc @AzureAppServiceCLI @antcp

@contento , thanks for reporting, we are looking at it.

Currently .NETCore app defaults to windows using az webapp up - this is by design

If something is default, it sounds like you can override it. So can you tell us IF it is at all possible to use az webapp up for app services for Linux?
And if yes; how?

for az webapp up for Linux for Node and Python Linux is the default, How to use it? run the command from the context of directory where the code to deploy is located and az webapp up will try to auto detect language & based on it set the defaults. If you don't want the defaults or need to override it use az webapp create

@panchagnula sorry, I meant to specify ASP.NET Core app.
Ok. So you can't use "az webapp up" to deploy Asp.net Core on Azure App Service for Linux, is what I wanted to clarify. Thanks.

I can use az webapp deployment source config-zip instead

@atlemagnussen

try az webapp up --os-type linux

Was this page helpful?
0 / 5 - 0 ratings

Related issues

williexu picture williexu  路  3Comments

seanknox picture seanknox  路  3Comments

ambakshi picture ambakshi  路  3Comments

derekbekoe picture derekbekoe  路  3Comments

Kannaj picture Kannaj  路  3Comments