Manage roles in Azure Cloud Services (extended support)
Note
This article applies to Azure Azure Cloud Services (extended support). Cloud Services (classic) is retired as of August 31, 2024. For more information, see Cloud services (classic) deployment model is retiring on August 31, 2024. For new development, we recommend that you use a newer service type designed for your specific purpose, such as Azure App Service, Azure Functions, or Azure Container Apps. For the latest list of available services, see Directory of Azure products.
After you have created your Azure Cloud Services (extended support) project, you can add new roles to it or remove existing roles from it. You can also import an existing project and convert it to a role. For example, you can import an ASP.NET web application and designate it as a web role.
Prerequisites
- Visual Studio (see [Visual Studio downloads] (https://visualstudio.microsoft.com/downloads/?cid=learn-onpage-download-cta)) with the Azure development workload installed, and the Individual Component .NET Framework project and item templates installed. See Modify Visual Studio.
- An Azure account. If you don't have an Azure account, activate your Azure benefits for Visual Studio subscribers or sign up for a free trial.
Adding a role to an Azure Cloud Services (extended support) project
The following steps guide you through adding a web or worker role to an Azure Cloud Services (extended support) project in Visual Studio.
Create or open an Azure Cloud Services (extended support) project in Visual Studio.
In Solution Explorer, expand the project node
Right-click the Roles node to display the context menu. From the context menu, select Add, then select an existing web role or worker role from the current solution, or create a web or worker role project. You can also select an appropriate project, such as an ASP.NET web application project, and associate it with a role project.
Removing a role from an Azure Cloud Services (extended support) project
The following steps guide you through removing a web or worker role from an Azure Cloud Services (extended support) project in Visual Studio.
Create or open an Azure Cloud Services (extended support) project in Visual Studio.
In Solution Explorer, expand the project node
Expand the Roles node.
Right-click the node you want to remove, and, from the context menu, select Remove.