how to pub xml files (#20847)

* how to pub xml files

* how to pub xml files

* Update aspnetcore/host-and-deploy/index.md

Co-authored-by: Luke Latham <llatham@aquent.com>

* how to pub xml files

Co-authored-by: Luke Latham <llatham@aquent.com>
pull/20854/head
Rick Anderson 2020-12-02 16:25:07 -10:00 committed by GitHub
parent e4123a242b
commit f887ea81f8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 11 additions and 0 deletions

View File

@ -23,6 +23,17 @@ In general, to deploy an ASP.NET Core app to a hosting environment:
The [dotnet publish](/dotnet/core/tools/dotnet-publish) command compiles app code and copies the files required to run the app into a *publish* folder. When deploying from Visual Studio, the `dotnet publish` step occurs automatically before the files are copied to the deployment destination.
## Publish settings files
`*.json` files are published by default. To publish other settings files, specify them in an [`<ItemGroup><Content Include= ... />`](/visualstudio/msbuild/common-msbuild-project-items#content) element in the project file. The following example publishes XML files:
```xml
<ItemGroup>
<Content Include="**\*.xml" Exclude="bin\**\*;obj\**\*"
CopyToOutputDirectory="PreserveNewest" />
</ItemGroup>
```
### Folder contents
The *publish* folder contains one or more app assembly files, dependencies, and optionally the .NET runtime.