Search code examples
azuredockervisual-studiovisual-studio-2022azure-container-instances

Visual Studio Publish Azure Container App missing


I have a NET 7 Console App and trying to publish docker container to Azure in Visual Studio 2022 following this guide (https://learn.microsoft.com/en-us/azure/container-apps/deploy-visual-studio).

For some reason I am unable to see all the Azure Publishing Target options. I only see the following:

enter image description here

Compared the following options in the MS guide:

enter image description here

My Visual Studio info:

Microsoft Visual Studio Community 2022
Version 17.7.5
VisualStudio.17.Release/17.7.5+34202.233
Microsoft .NET Framework
Version 4.8.09032

I have confirmed and tried the following:

  • Confirmed Azure Service Authentication account is logged in.
  • Project Target Framework = net7.0
  • Project Docker Default Target OS = Linux
  • Installed VS Azure Development workload
  • Confirmed Docker container builds fine and runs fine in Docker Desktop locally

Any ideas why the Azure Container target (and so many others) is missing for me?


Solution

  • If you are trying with the console app, the option won’t be visible. Those options are available in the ASP.NET Core Web App only.

    I followed the same MS Document and was able to see the options and publish.

    I created an ASP. NET Core Web App with .net 7 version. Click on Enable Docker option and clicked on create as below:

    enter image description here

    Then, I started publishing the application as below:-

    enter image description here

    enter image description here

    I created a container app as shown below,

    enter image description here

    enter image description here

    enter image description here

    Next, I created a Registry like below,

    enter image description here

    enter image description here

    enter image description here

    enter image description here

    Then, I clicked on Publish as shown below:

    enter image description here

    The app was published successfully as below:-

    enter image description here

    The below output URL opens in the browser.

    enter image description here

    Then, I refreshed the browser and got the below output:-

    enter image description here