AspNetCore.Docs
AspNetCore.Docs copied to clipboard
Publish Profile is lacking reference information
Description
I could not find any reference information in this article.
Particularly, I am looking for the valid properties in PropertyGroup, if I were to write a publishing profile by hand, and not relying on VS.
Page URL
https://learn.microsoft.com/en-us/aspnet/core/host-and-deploy/visual-studio-publish-profiles?view=aspnetcore-8.0
Content source URL
https://github.com/dotnet/AspNetCore.Docs/blob/main/aspnetcore/host-and-deploy/visual-studio-publish-profiles.md
Document ID
2db330b4-e830-715f-0a15-e406f85e1d3b
Article author
@tdykstra
Here's what CoPilot suggests. I'll look for a definitive link, but maybe this list will help: Common Properties
-
PublishUrlSpecifies the URL or file path to which the project will be published. -
PublishProviderDefines the provider used for publishing, such as FileSystem, MSDeploy, or FTP. -
PublishMethodDetermines the method of publishing, e.g., MSDeploy, FTP, FileSystem. -
SiteUrlToLaunchAfterPublishURL to launch after publishing the project. -
LastUsedBuildConfigurationSpecifies the build configuration used for the last publish, such as Release or Debug. -
LastUsedPlatformIndicates the platform used for the last publish, such as AnyCPU, x86, or x64. -
LaunchSiteAfterPublishBoolean property to determine if the site should be launched after publish (True or False). -
ExcludeApp_DataBoolean property to exclude the App_Data folder from the publish (True or False). -
EnableMSDeployAppOfflineBoolean property to enable app offline mode during publishing with MSDeploy (True or False). -
MSDeployServiceURLURL of the MSDeploy service. -
DeployIisAppPathIIS application path where the application will be deployed. -
UserNameUsername for the deployment. -
PasswordPassword for the deployment. (Note ` Storing passwords in plain text is not secure; use secure methods where possible.) -
AllowUntrustedCertificateBoolean property to allow the use of untrusted certificates (True or False). -
_DestinationTypeSpecifies the type of the publish destination, e.g., AzureWebSite, AzureApiApp, AzureFunctionApp. -
ConfigurationBuild configuration to use for publishing, e.g., Release, Debug. -
TargetFrameworkTarget framework to use for publishing, e.g., netcoreapp3.1, net5.0. -
RuntimeIdentifierRuntime identifier to use for publishing, e.g., win-x64, linux-x64. -
SelfContainedBoolean property to specify if the application should be published as self-contained (True or False). - Web Application Specific Properties:
-
WebPublishMethodSpecifies the method used for web publishing, e.g., MSDeploy, FileSystem, FTP. -
_PublishWebProjectBoolean property to specify if the web project should be published (True or False). -
MSDeployPublishMethodMethod used by MSDeploy, e.g., WMSVC, RemoteAgent, InProc. -
_MSDeployUseChecksumBoolean property to specify if checksums should be used during MSDeploy (True or False). -
DeployOnBuildBoolean property to specify if the project should be deployed on build (True or False). -
WebPublishPipelineTransformSpecifies the web.config transform to apply during publishing. - Database Project Specific Properties:
-
DeployDatabaseProjectBoolean property to specify if a database project should be deployed (True or False). -
SqlPublishProfilePathPath to the SQL publish profile to use. -
TargetDatabaseNameName of the target database. -
TargetConnectionStringConnection string for the target database. -
BackupDatabaseBeforeDeployBoolean property to specify if the database should be backed up before deployment (True or False).
Here is an example of a .pubxml file illustrating some of these properties `
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http `//schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<PublishUrl>ftp `//ftp.example.com/website/</PublishUrl>
<PublishProvider>FTP</PublishProvider>
<PublishMethod>FTP</PublishMethod>
<SiteUrlToLaunchAfterPublish>http `//www.example.com</SiteUrlToLaunchAfterPublish>
<LastUsedBuildConfiguration>Release</LastUsedBuildConfiguration>
<LastUsedPlatform>AnyCPU</LastUsedPlatform>
<LaunchSiteAfterPublish>True</LaunchSiteAfterPublish>
<ExcludeApp_Data>False</ExcludeApp_Data>
<EnableMSDeployAppOffline>True</EnableMSDeployAppOffline>
<MSDeployServiceURL>https `//msdeploy.example.com</MSDeployServiceURL>
<DeployIisAppPath>Default Web Site/MyApp</DeployIisAppPath>
<UserName>ftpuser</UserName>
<Password>ftppassword</Password>
<AllowUntrustedCertificate>False</AllowUntrustedCertificate>
<DeployOnBuild>True</DeployOnBuild>
<Configuration>Release</Configuration>
<TargetFramework>net5.0</TargetFramework>
<SelfContained>False</SelfContained>
</PropertyGroup>
</Project>