Preventing referenced assembly PDB and XML files copied to output
The alternate answer to add and delete referenced assemblies in our primary application while excepting the need to maintain which files we need to delete or exclude.
The AllowedReferenceRelatedFileExtensions property is defaults to .pdb; .xml. The catch is that we shall need something whitespace is not sufficient or it will use the default still.
<Project ...> <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> ... <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. --> .allowedextension </AllowedReferenceRelatedFileExtensions> </PropertyGroup>