Configure an Azure Cloud Services (extended support) project with Visual Studio
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.
You can configure an Azure Cloud Services (extended support) project, depending on your requirements for that project. You can set properties for the project for the following categories:
- Publish a cloud service to Azure - You can set a property to make sure that an existing cloud service deployed to Azure is not accidentally deleted.
- Run or debug a cloud service on the local computer - You can select a service configuration to use and indicate whether you want to start the Azure Storage Emulator.
- Validate a cloud service package when it is created - You can decide to treat any warnings as errors so that you can ensure that the cloud service package deploys without any issues.
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.
Steps to configure an Azure Cloud Services (extended support) project
Open or create a cloud service project in Visual Studio
In Solution Explorer, right-click the project, and, from the context menu, select Properties.
In the project's properties page, select the Development tab.
Set Prompt before deleting an existing deployment to True. This setting helps to ensure you don't accidentally delete an existing deployment in Azure
Select the desired Service configuration to indicate which service configuration you want to use when you run or debug your cloud service locally. For more information on how to modify a service configuration for a role, see How to configure the roles for an Azure Cloud Services (extended support) project with Visual Studio.
Set Start Azure Storage Emulator to True to start the Azure Storage Emulator when you run or debug your cloud service locally.
Set Treat warnings as errors to True to make sure you cannot publish if there are package validation errors.
Set Use web project ports to True to make sure that your web role uses the same port each time it starts locally in Internet Information Services (IIS) Express.
From the Visual Studio toolbar, select Save.