Reputation: 1079
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:
Compared the following options in the MS guide:
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:
Any ideas why the Azure Container target (and so many others) is missing for me?
Upvotes: 1
Views: 541
Reputation: 3649
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:
Then, I started publishing the application as below:-
I created a container app as shown below,
Next, I created a Registry like below,
Then, I clicked on Publish as shown below:
The app was published successfully as below:-
The below output URL opens in the browser.
Then, I refreshed the browser and got the below output:-
Upvotes: 1