Why is "Azure App Service Container" publish option missing in Visual Studio 2022

Eduardo Gregorio 0 Reputation points
2023-02-15T19:26:07.88+00:00

I added Docker support to an existing web application (.NET Framework v 4.8) in Visual Studio Enterprise 2022 (version 17.4.5).

When I try to publish to Azure, I see the following options:

  • Azure App Service (Windows)
  • Azure Container Registry
  • Azure Virtual Machine

The Microsoft Learn documentation (https://learn.microsoft.com/en-us/visualstudio/containers/deploy-app-service?view=vs-2022) shows an additional publish option for "Azure App Service Container" but I can't see it.

Are there any prerequisites?

Azure Container Registry
Azure Container Registry
An Azure service that provides a registry of Docker and Open Container Initiative images.
508 questions
Azure App Service
Azure App Service
Azure App Service is a service used to create and deploy scalable, mission-critical web apps.
8,931 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Andriy Bilous 11,821 Reputation points MVP Volunteer Moderator
    2023-02-16T14:29:14.03+00:00

    Hello @Eduardo Gregorio

    Web application (.NET Framework v 4.8) can be Dockerized only in Windows containers using official Windows Server Core images
    Solution might be to use extended windows server core image with sdk 4.8.

    https://stackoverflow.com/questions/71057574/cannot-build-net-framework-web-app-targeting-4-7-2-with-vs-2022-installed-on-a

    Diagram showing what OS to target based on .NET Framework version.

    Azure ecosystem supports Windows Docker Containers in following services:

    • Azure App Service
    • Azure Container Registry
    • Azure Virtual Machine
    • Azure Container Instances
    • Azure Kubernetes Services

  2. Grmacjon-MSFT 19,151 Reputation points Moderator
    2023-03-17T22:16:06.6333333+00:00

    Hi @Eduardo Gregorio

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution in case you'd like to "Accept" the answer.

    Issue:

    -You added Docker support to your existing web application (.NET Framework v 4.8) in Visual Studio Enterprise 2022 (version 17.4.5).

    -When you tried to publish to Azure, Azure App Service Container option was missing in Visual Studio 2022

    Solution:

    • you were able to run your application with Docker Desktop and you realized the documentation you were following started with creating a .NET Core app, and yours was on .NET framework.

    If you have any other questions or are running into more Azure App Service Container issues, please let me know. Thanks again for sharing what worked for you.


    Please remember to "Accept Answer" if any answer/reply helped, so that others in the community facing similar issues can easily find the solution.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.