XML Documentation file is not included in publish folder

If you're using project.json then you can control the files and folders that are both included and excluded by the publish process:

  "publishOptions": {
    "include": [
      "wwwroot",
      "appsettings.json",
      "appsettings.*.json",
      "web.config"
    ],
    "exclude": [
      "wwwroot/less"
    ]
  }

For .csproj based projects here is a good resource for replicating old project.json settings in XML, for example:

<ItemGroup>
  <Compile Include="..\Shared\*.cs" Exclude="..\Shared\Not\*.cs" />
  <EmbeddedResource Include="..\Shared\*.resx" />
  <Content Include="Views\**\*" PackagePath="%(Identity)" />
  <None Include="some/path/in/project.txt" Pack="true" PackagePath="in/package.txt" />

  <None Include="notes.txt" CopyToOutputDirectory="Always" />
  <!-- CopyToOutputDirectory = { Always, PreserveNewest, Never } -->

  <Content Include="files\**\*" CopyToPublishDirectory="PreserveNewest" />
  <None Include="publishnotes.txt" CopyToPublishDirectory="Always" />
  <!-- CopyToPublishDirectory = { Always, PreserveNewest, Never } -->
</ItemGroup>

Apparently this is not implemented in with dotnet publish but will be in the near future: https://github.com/dotnet/sdk/issues/795