No Web Role for Visual Studio 2022 Azure Cloud Service

174 Views Asked by At

I am wondering if I could get some help figuring out what I have done wrong here. I have been trying to learn .NET cloud development through exercises (https://learn.microsoft.com/en-us/visualstudio/azure/vs-azure-tools-azure-project-create?view=vs-2022), but I have run into many issues while trying to create an Azure Cloud Service app.

I've tried uninstalling and reinstalling (and restarting pc after of course), I've tried looking up the issue other places, I've tried reading documentation and I just am at a loss.

enter image description here

Why is there no "ASP.NET Web Role" option when creating the project?

Any advice would be amazing.

I have tried everything I can. I am no expert and I am assuming I just missed something.

1

There are 1 best solutions below

3
Dai On

No Web Role for Visual Studio 2022 Azure Cloud Service

Azure Cloud Services were an initial Azure PaaS offering waaaay back around 2010-ish - they've since been killed-off and it isn't possible to create a new Cloud Service anymore, and the entire service will be shut-down in August 2024 (it was originally going to be in 2023 but they issued a stay-of-execution).

So it should come as no surprise that the latest version of VS doesn't come with Web Role project templates (though I am surprised that VS2022 still comes with Azure Cloud Service project templates, even if they only offer Worker Roles).

I am wondering if I could get some help figuring out what I have done wrong here. I have been trying to learn .NET cloud development through exercises (https://learn.microsoft.com/en-us/visualstudio/azure/vs-azure-tools-azure-project-create?view=vs-2022),

Where you went-wrong was thinking that targeting Azure Cloud Services is a good idea. It isn't. Instead, you have these options today:

  • Azure Cloud Services' Web Roles was IIS-hosted code deployed to a varying number of VMs that you manage (and update) yourself.
    • Today, you'd use Azure App Services (formerly known as Azure Websites) though you lose the ability to manage VMs yourself.
    • But if you need to control those VMs directly then today you'd probably use Kubernetes, Docker, or your own ARM (Azure Resource Manager) scripts to manage VMs.
  • Azure Cloud Services' Worker Roles are replaced by Azure Service Fabric (at the high-end), or just a single VM (at the low-end).
    • Visual Studio has built-in support for publishing arbitrary (i.e. not just IIS-based) applications to Azure VMs too.

Or follow MS's decision flowchart:

enter image description here