VS在編譯時,默認會複製全部引用程序集對應的XML文件到輸出目錄。spa
在項目中設置AllowedReferenceRelatedFileExtensions能夠避免複製操做。code
<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>