Many of project assemblies has xml document files, which msbuild includes in the deployment build and copy them into bin folder. To exclude these files:
1. Unload project
2. Open project file for editing
3. Add next lines in the PropertyGroup section of each environment you want to exclude *.xml files
<AllowedReferenceRelatedFileExtensions> <!-- Prevent default XML and PDB files copied to output in RELEASE. Only *.allowedextension files will be included, which doesn't exist in my case. --> *.pdb; *.xml </AllowedReferenceRelatedFileExtensions>
In the example these lines added into the Debug and Release builds:
4. Reload and rebuild project.