You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following steps guide you through adding a web or worker role to an Azure cloud service project in Visual Studio.
23
25
24
26
1. Create or open an Azure cloud service project in Visual Studio.
@@ -30,6 +32,7 @@ The following steps guide you through adding a web or worker role to an Azure cl
30
32

31
33
32
34
## Removing a role from an Azure cloud service
35
+
33
36
The following steps guide you through removing a web or worker role from an Azure cloud service project in Visual Studio.
34
37
35
38
1. Create or open an Azure cloud service project in Visual Studio.
@@ -43,6 +46,7 @@ The following steps guide you through removing a web or worker role from an Azur
43
46

44
47
45
48
## Readding a role to an Azure cloud service project
49
+
46
50
If you remove a role from your cloud service project but later decide to add the role back to the project, only the role declaration and basic attributes, such as endpoints and diagnostics information, are added. No additional resources or references are added to the `ServiceDefinition.csdef` file or to the `ServiceConfiguration.cscfg` file. If you want to add this information, you need to manually add it back into these files.
47
51
48
52
For example, you might remove a web service role and later you decide to add this role back into your solution. If you do this, an error occurs. To prevent this error, you have to add the `<LocalResources>` element shown in the following XML back into the `ServiceDefinition.csdef` file. Use the name of the web service role that you added back into the project as part of the name attribute for the **\<LocalStorage>** element. In this example, the name of the web service role is **WCFServiceWebRole1**.
@@ -69,4 +73,5 @@ For example, you might remove a web service role and later you decide to add thi
69
73
```
70
74
71
75
## Related content
76
+
72
77
-[Configure the Roles for an Azure cloud service with Visual Studio](vs-azure-tools-configure-roles-for-cloud-service.md)
To publish a cloud service project, you must set up the following services as described in this article:
16
17
17
-
* A **cloud service** to run your roles in the Azure environment, and
18
-
* A **storage account** that provides access to the Blob, Queue, and Table services.
18
+
- A **cloud service** to run your roles in the Azure environment, and
19
+
- A **storage account** that provides access to the Blob, Queue, and Table services.
19
20
20
21
## Prerequisites
21
22
@@ -71,7 +72,7 @@ To configure settings manually, use the property pages in Visual Studio for the
71
72
72
73
### About access keys
73
74
74
-
The Azure portal shows the URLs that you can use to access resources in each of the Azure storage services, and also the primary and secondary access keys for your account. You use these keys to authenticate requests made against the storage services.
75
+
The Azure portal shows the URLs that you can use to access resources in each of the Azure Storage services, and also the primary and secondary access keys for your account. You use these keys to authenticate requests made against the storage services.
75
76
76
77
The secondary access key provides the same access to your storage account as the primary access key and is generated as a backup should your primary access key be compromised. Additionally, it is recommended that you regenerate your access keys on a regular basis. You can modify a connection string setting to use the secondary key while you regenerate the primary key, then you can modify it to use the regenerated primary key while you regenerate the secondary key.
When you update a cloud service that's hosted in Azure, you might need to ensure that the virtual IP address (VIP) of the service doesn't change. Many domain management services use the Domain Name System (DNS) for registering domain names. DNS works only if the VIP remains the same. You can use the **Publish Wizard** in Azure Tools to ensure that the VIP of your cloud service doesn’t change when you update it. For more information about how to use DNS domain management for cloud services, see [Configuring a custom domain name for an Azure cloud service](/azure/cloud-services/cloud-services-custom-domain-name-portal).
16
+
When you update a cloud service that's hosted in Azure, you might need to ensure that the virtual IP (VIP) address (VIP) of the service doesn't change. Many domain management services use the Domain Name System (DNS) for registering domain names. DNS works only if the VIP remains the same. You can use the **Publish Wizard** in Azure Tools to ensure that the VIP of your cloud service doesn't change when you update it. For more information about how to use DNS domain management for cloud services, see [Configuring a custom domain name for an Azure cloud service](/azure/cloud-services/cloud-services-custom-domain-name-portal).
## Publish a cloud service without changing its VIP
22
-
The VIP of a cloud service is allocated when you first deploy it to Azure in a particular environment, such as the production environment. The VIP changes only if you delete the deployment explicitly or the deployment is implicitly deleted by the deployment update process. To retain the VIP, you must not delete your deployment, and you must make sure that Visual Studio doesn’t delete your deployment automatically.
23
+
24
+
The VIP of a cloud service is allocated when you first deploy it to Azure in a particular environment, such as the production environment. The VIP changes only if you delete the deployment explicitly or the deployment is implicitly deleted by the deployment update process. To retain the VIP, you must not delete your deployment, and you must make sure that Visual Studio doesn't delete your deployment automatically.
23
25
24
26
You can specify deployment settings in the **Publish Wizard**, which supports several deployment options. You can specify a fresh deployment or an update deployment, which can be incremental or simultaneous. Both kinds of update deployment retain the VIP. For definitions of these different types of deployment, see [Publish Azure Application Wizard](vs-azure-tools-publish-azure-application-wizard.md). In addition, you can control whether the previous deployment of a cloud service is deleted if an error occurs. If you don't set that option correctly, the VIP might change unexpectedly.
25
27
26
28
## Update a cloud service without changing its VIP
29
+
27
30
1. Create or open an Azure cloud service project in Visual Studio.
28
31
29
32
2. In **Solution Explorer**, right-click the project. On the shortcut menu, select **Publish**.
@@ -34,11 +37,11 @@ You can specify deployment settings in the **Publish Wizard**, which supports se
34
37
35
38

36
39
37
-
4. On the **Common Settings** tab, verify that the name of the cloud service to which you’re deploying, the **Environment**, the **Build configuration**, and the **Service configuration** are all correct.
40
+
4. On the **Common Settings** tab, verify that the name of the cloud service to which you're deploying, the **Environment**, the **Build configuration**, and the **Service configuration** are all correct.
38
41
39
42

40
43
41
-
5. On the **Advanced Settings** tab, verify that the **Deployment label** and the **Storage account** are correct. Verify that the **Delete deployment on failure**check box is cleared, and verify that the **Deployment update**check box is selected. By clearing the **Delete deployment on failure**check box, you ensure that your VIP isn't lost if an error occurs during deployment. By selecting the **Deployment update**check box, you ensure that your deployment isn't deleted and your VIP isn't lost when you republish your application.
44
+
5. On the **Advanced Settings** tab, verify that the **Deployment label** and the **Storage account** are correct. Verify that the **Delete deployment on failure**checkbox is cleared, and verify that the **Deployment update**checkbox is selected. By clearing the **Delete deployment on failure**checkbox, you ensure that your VIP isn't lost if an error occurs during deployment. By selecting the **Deployment update**checkbox, you ensure that your deployment isn't deleted and your VIP isn't lost when you republish your application.
@@ -17,14 +18,16 @@ Using the Microsoft Build Engine (MSBuild), you can build products in build-lab
17
18
You can also run MSBuild at the command line, and this topic describes that approach. By setting properties on the command line, you can build specific configurations of a project. Similarly, you can also define the targets that MSBuild builds. For more information about command-line parameters and MSBuild, see [MSBuild Command-Line Reference](../msbuild/msbuild-command-line-reference.md).
18
19
19
20
## MSBuild parameters
21
+
20
22
The simplest way to create a package is to run MSBuild with the `/t:Publish` option. By default, this command creates a directory in relation to the root folder for the project, such as `<ProjectDirectory>\bin\Configuration\app.publish\`. When you build an Azure project, two files are generated: the package file itself and the accompanying configuration file:
By default, each Azure project includes one service-configuration file for local (debugging) builds and another for cloud (staging or production) builds. However, you can add or remove service-configuration files as needed. When you build a package within Visual Studio, you are asked which service-configuration file to include alongside the package. When you build a package by using MSBuild, the local service-configuration file is included by default. To include a different service-configuration file, set the `TargetProfile` property of the MSBuild command (`MSBuild /t:Publish /p:TargetProfile=ProfileName`).
26
28
27
29
If you want to use an alternate directory for the stored package and configuration files, set the path by using the `/p:PublishDir=Directory\` option, including the trailing backslash separator.
28
30
29
31
## Related content
32
+
30
33
After the package is built, you can deploy it to Azure.
0 commit comments