Skip to content

Latest commit

 

History

History
55 lines (32 loc) · 2.65 KB

runtime_detection.md

File metadata and controls

55 lines (32 loc) · 2.65 KB

Troubleshoot auto-detect runtime issues with az webapp up

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.

Troubleshooting Steps

  1. 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.
  2. Confirm your project structure complies with requirements outlined in the the "Automatic Runtime Detection Logic" section below.
  3. Still having issues? Create an issue in our repository: https://github.com/Azure/app-service-linux-docs/issues

Automatic Runtime Detection Logic

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 logic

Python detection looks for the existence of a file titled requirements.txt in the root folder of the project.

Node detection logic

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 logic

ASP .NET and .NET Core detection is done by looking for the existence of *.csproj in the root folder of the project.

.NET 5

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>

HTML

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.

Manual runtime definition

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.