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
Copy file name to clipboardExpand all lines: aspnetcore/host-and-deploy/visual-studio-publish-profiles.md
+14-7Lines changed: 14 additions & 7 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -16,7 +16,12 @@ By [Sayed Ibrahim Hashimi](https://github.com/sayedihashimi) and [Rick Anderson]
16
16
17
17
This document focuses on using Visual Studio 2022 or later to create and use [publish profiles](/visualstudio/deployment/publish-overview). The publish profiles created with Visual Studio can be used with MSBuild and Visual Studio. For instructions on publishing to Azure, see <xref:tutorials/publish-to-azure-webapp-using-vs>.
18
18
19
-
See [Overview of Visual Studio Publish](/visualstudio/deployment/publish-overview), which contains the most current information on publishing with Visual Studio.
19
+
For the most current and detailed information on:
20
+
21
+
* Publishing with Visual studio, see [Overview of Visual Studio Publish](/visualstudio/deployment/publish-overview)
22
+
* MSBuild, see [MSBuild](/visualstudio/msbuild/msbuild-introduction)
23
+
* Publishing with MSBuild, see [Microsoft.NET.Sdk.Publish](https://github.com/dotnet/sdk/tree/main/src/WebSdk#microsoftnetsdkpublish)
24
+
* MSBuild, see [MSBuild](/visualstudio/msbuild/msbuild-introduction)
20
25
21
26
The `dotnet new mvc` command produces a project file containing the following root-level [\<Project> element](/visualstudio/msbuild/project-element-msbuild):
The `dotnet publish` command calls MSBuild, which invokes the `Publish` target. Any parameters passed to `dotnet publish` are passed to MSBuild. The `-c` and `-o` parameters map to MSBuild's `Configuration` and `OutputPath` properties, respectively.
106
111
107
-
MSBuild properties can be passed using either of the following formats:
112
+
[Project properties](/visualstudio/msbuild/msbuild-command-line-reference) can be passed using either of the following formats:
108
113
109
114
*`-p:<NAME>=<VALUE>`
110
115
*`/p:<NAME>=<VALUE>`
@@ -128,11 +133,10 @@ Create a publish profile in Visual Studio by choosing one of the following paths
128
133
* Right-click the project in **Solution Explorer** and select **Publish**.
129
134
* Select **Publish {PROJECT NAME}** from the **Build** menu.
130
135
131
-
The **Publish** tab of the app capabilities page is displayed. If the project lacks a publish profile, the **Pick a publish target** page is displayed. You're asked to select one of the following publish targets:
136
+
The **Publish** tab of the app capabilities page is displayed. Several publish targets are available, including:
132
137
133
-
* Azure App Service
134
-
* Azure App Service on Linux
135
-
* Azure Virtual Machines
138
+
* Azure
139
+
* Docker Container Registry
136
140
* Folder
137
141
* IIS, FTP, Web Deploy (for any web server)
138
142
* Import Profile
@@ -148,7 +152,10 @@ Visual Studio's publish tool produces a `Properties/PublishProfiles/{PROFILE NAM
148
152
* Contains publish configuration settings and is consumed by the publishing process.
149
153
* Can be modified to customize the build and publish process.
150
154
151
-
When publishing to an Azure target, the *.pubxml* file contains the Azure subscription identifier. With that target type, adding this file to source control is discouraged. When publishing to a non-Azure target, it's safe to check in the *.pubxml* file.
155
+
When publishing to an Azure target, the *.pubxml* file:
156
+
157
+
* Contains the Azure subscription identifier.
158
+
* Should not be checked into source control because the subscription identifier is sensitive information.
152
159
153
160
Sensitive information, for example, the publish password, is encrypted on a per user/machine level. The `Properties/PublishProfiles/{PROFILE NAME}.pubxml.user` file contains the information needed by MSBuild to retrieve the user name and password.
0 commit comments