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
parent
e4123a242b
commit
f887ea81f8
|
@ -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.
|
||||
|
|
Loading…
Reference in New Issue