The Azure CLI includes a set of commands to manage Web App resources (learn more). Included in this set of commands az webapp up
bundles functionality to create a Web App and deploy code from a local workspace. Current support includes apps targeting:
As part of the execution of az webapp up
command it performs a best effort detection to match your code (in your local directory) with a supported runtime in your Web App.
- Make sure you are in the right folder.
az webapp up
should be run from the local folder containing your code. The most common mistake is running the command in the parent directory. - Confirm your project structure complies with requirements outlined in the the "Automatic Runtime Detection Logic" section below.
- Still having issues? Create an issue in our repository: https://github.com/Azure/app-service-linux-docs/issues
The runtime detections logic uses the hints outlined below. Any code that doesn’t match this logic is blocked to avoid compatibility issues.
Python detection looks for the existence of a file titled requirements.txt
in the root folder of the project.
Node detection looks for the existence of the package.json
or sever.js
or index.js
in the root folder of the project.
ASP .NET and .NET Core detection is done by looking for the existence of *.csproj
in the root folder of the project.
Detection logic for .NET 5 apps will look into your *.csproj
file in the current folder.
Detection will then check value set for TargetFramework
element looking for net5.0
string.
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net5.0</TargetFramework>
</PropertyGroup>
</Project>
Static content needs to use the explicit --html
flag to indicate that static content is being deployed. Validation is done by looking for *.html
or *.htm
or *.shtml
files in the root folder of the project.
The runtime is a property of the web app used to host your code. If you want to set the runtime manually you can use the az webapp create command.