zoukankan      html  css  js  c++  java
  • VisualStudio编译不生成xml、pdb文件的方法

    我们为了减少发布/Release时项目的体积,希望在编译时不生成xml注释文档(包括引用的其他类库),和pdb调试文件

    用你喜欢的文本编辑器打开项目.csproj文件,找到PropertyGroup节点

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
     
    </PropertyGroup>

    节点中加入元素节点AllowedReferenceRelatedFileExtensions

    <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
      <AllowedReferenceRelatedFileExtensions>
        <!-- 阻止默认的 XML 和 PDB 文件复制到 RELEASE 的输出目录. 只有*.allowedextension 扩展名的文件可以被包含, 当然这个扩展的文件并不存在.-->
        .allowedextension
      </AllowedReferenceRelatedFileExtensions>
    </PropertyGroup>

    注:不同的编译方式请在相应的PropertyGroup下都添加上

  • 相关阅读:
    二进制数组ArrayBuffer
    iperf3测量一个网络最大带宽
    Proxy与Reflect
    Symbol
    Iterator
    Set与Map
    Generator
    Android 共享参数 SharedPreferences
    DDMS files not found: xxxhprof-conv.exe
    Android 状态栏通知 Notification
  • 原文地址:https://www.cnblogs.com/siyunianhua/p/14140598.html
Copyright © 2011-2022 走看看