避免複製引用程序集的XML文件

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>

 參考:https://stackoverflow.com/questions/2011434/preventing-referenced-assembly-pdb-and-xml-files-copied-to-output/8757948orm

相關文章
相關標籤/搜索