dotnet / dotnet/AspNetCore.Docs

Publish to Azure with VS: Add Azure App Service (Linux)

Open
#27,742 5 comments 0 reactions 1 assignee Claimed by @wadepickett View on GitHub
doc-enhancement Pri2 Source - Docs.ms
Dominant language
C#
Stars
13.1k
Forks
24.6k
Avg merge
1d 3h
Merged PRs (30d)
97

Description

This topic currently centers on publishing on the Azure App Service (Window)s. Add a tab and instructions for publishing on Azure App Service (Linux) as well.

See related discussion on issue https://github.com/dotnet/AspNetCore.Docs/issues/26774 that tracks the Windows version.

Notes:
Verified with the dev team on current best practice with current tools. Per Angelos:
Steps currently for publishing on Linux with EF involved as in this topic:
At the bottom of the publish profile is the section Service Dependencies which allows connections to the application to things like SQL, Storage, KeyVault, etc.

This tutorial walks through it, although it’s a little dated, the screenshots won’t match the latest version of VS:
[Tutorial: ASP.NET app with Azure SQL Database - Azure App Service | Microsoft Learn](https://learn.microsoft.com/en-us/azure/app-service/app-service-web-tutorial-dotnet-sqldatabase)

Once connected to an Azure database, [run migrations](https://learn.microsoft.com/en-us/visualstudio/azure/azure-sql-database-add-connected-service?view=vs-2022#entity-framework-migrations). There are also options to [generate SQL scripts, etc.](https://learn.microsoft.com/en-us/visualstudio/azure/azure-sql-database-add-connected-service?view=vs-2022#connect-to-azure-sql-database-using-connected-services).

Also see related issue #26774

Priority history:
This was set to pri3, see discussion on PR #27185 (low traffic), but after discussion with the development team it has been moved to P2 (higher business case and a need for building traffic).

---
#### Document Details

⚠ *Do not edit this section. It is required for learn.microsoft.com ➟ GitHub issue linking.*

* ID: 71a44c72-d256-fbee-ea70-2eb7472f8182
* Version Independent ID: 157027ff-0bad-828d-a442-a98acd219fba
* Content: [Publish an ASP.NET Core app to Azure with Visual Studio](https://learn.microsoft.com/en-us/aspnet/core/tutorials/publish-to-azure-webapp-using-vs?view=aspnetcore-6.0)
* Content Source: [aspnetcore/tutorials/publish-to-azure-webapp-using-vs.md](https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/tutorials/publish-to-azure-webapp-using-vs.md)
* Product: **aspnet-core**
* Technology: **aspnetcore-tutorials**
* GitHub Login: @Rick-Anderson
* Microsoft Alias: **riande**

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.