1.  Project->Properties->Build->Advance,

Debug Info : Full/pdb-only .

set to [none] will not generate pdb file.

2.when new version release , rebuild whole solution , copy all files to server.

 

what's the difference between C# compilation setting “/debug:pdbonly” and “/debug:full”?

The main difference is about performance.

Be aware that when you create a new project in Visual Studio, the Default configuration (/optimized- and /debug:full) ,produce unoptimized code. So the C # compiler will emit NOP (no-operation) instructions into the code. (The NOP instructions are emitted for example to enabled the “edit and continue” feature while debugging, or to allow breakpoints to be set on control flow instructions such as for, while, do, if , else, try, catch and finally ) impacting directly on the speed and size of the JIT optimized code.

On the other hand, In managed environment (.NET), compiling the code is accomplished in two phases. First, the compiler passes over the source code producing IL. Then, at run time the IL must be compiled into native CPU instructions requiring more memory to be allocated and requiring additional CPU time to do the work (JIT). So having an optimized IL code quality and an optimized JIT Native code quality by setting /optimized+ and /debug:pdbonly (default configuration for compilations if Release is chosen) could improve the performance of the application.

Moral of a fable, always compile in release mode when deliver your apps to the end users and you could gain a bit of performance.

 

 

Should I compile release builds with debug info as “full” or “pdb-only”?

I would build with pdb-only. You will not be able to attach a debugger to the released product, but if you get a crash dump, you can use Visual Studio or WinDBG to examine the stack traces and memory dumps at the time of the crash.

If you go with full rather than pdb-only, you'll get the same benefits, except that the executable can be attached directly to a debugger. You'll need to determine if this is reasonable given your product & customers.

Be sure to save the PDB files somewhere so that you can reference them when a crash report comes in. If you can set up a symbol server to store those debugging symbols, so much the better.

If you opt to build with none, you will have no recourse when there's a crash in the field. You won't be able to do any sort of after-the-fact examination of the crash, which could severely hamper your ability to track down the problem.

A note about performance:

Both John Robbins and Eric Lippert have written blog posts about the /debug flag, and they both indicate that this setting has zero performance impact. There is a separate /optimize flag which dictates whether the compiler should perform optimizations.

 

/debug (C# Compiler Options)

One difference between /debug:pdbonly and /debug:full is that with /debug:full the compiler emits a DebuggableAttribute, which is used to tell the JIT compiler that debug information is available. Therefore, you will get an error if your code contains the DebuggableAttribute set to false if you use /debug:full.

C# dmp debug, can't load pdb file的更多相关文章

  1. vs2010调试程序出现“Cannot find or open the PDB file”

    项目中源程序编写好以后, (一个简单的小程序) #include int main(void) { int age; int day; age = 24; printf("tom is %d ...

  2. Cannot find or open the PDB file问题的解决

    'testcv.exe' (Win32): Loaded 'D:\Documents\Visual Studio 2013\Projects\testcv\x64\Debug\testcv.exe'. ...

  3. 解决Cannot find or open the PDB file问题

    今天使用opencv里的mat想要保存数据里边的像素的平均值和标准差: 但是编程好了之后会出现下面的问题,不能找到pdb file .下面将提供三种解决方法以及产生问题的原因. 程序也运行不出来,整个 ...

  4. cannot load such file -- openssl

    [test@localhost usr]$ /usr/local/ruby/bin/gem install bundler ERROR: Loading command: install (LoadE ...

  5. Python load json file with UTF-8 BOM header - Stack Overflow

    Python load json file with UTF-8 BOM header - Stack Overflow 3 down vote Since json.load(stream) use ...

  6. fatal error C1083: Cannot open precompiled header file: 'Debug/xxoo.pch': No such file or directory

    fatal error C1083: Cannot open precompiled header file: 'Debug/xxoo.pch': No such file or directory ...

  7. require './ex25' can't load such file

    require './ex25' can't load such file 在练习learn ruby the hard way时候,第25题,发生了一下错误 LoadError: cannot lo ...

  8. bundle install 安装的 gem 提示 cannot load such file

    /usr/local/lib/ruby/site_ruby/2.1.0/rubygems/core_ext/kernel_require.rb:54:in `require': cannot load ...

  9. redis-trib.rb报错:/usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- redis (LoadError)

    报错如下: /usr/lib/ruby/1.9.1/rubygems/custom_require.rb:36:in `require': cannot load such file -- redis ...

随机推荐

  1. 阿里云RDS上用mysqldump导入导出

    文章转载自: http://blog.csdn.net/jk0803_wantao/article/details/9179217 1. 开通云服务器服务.2. 开通RDS服务,如果开通成功,会返回给 ...

  2. 从Unauthorized 401错误学习Spring Boot的Actuator

    之前用Spring Boot都是别人搭好的框架,然后自己在里面写就行了.对原理.细节上都怎么涉及,毕竟需求都做不完.但是昨天一个访问RESTful接口的401问题搞了我2个小时.网上找的很多用: ma ...

  3. windows C 盘大小异常增大并解决记录

    前几天偶然看了一下 C 盘的大小,发现分配的 60 G 最后剩下 8G 可用.十分怀疑. 我先是下载 WizTree 工具进行查看C盘大小,有如下, pagefile.sys 是我修改后变为1G, 前 ...

  4. MySql生成日历表

    mysql使用存储过程,创建日历表: 准备日历表: CREATE TABLE `m_dim_day` ( `ID` ) NOT NULL AUTO_INCREMENT, `DAY_ID` ) DEFA ...

  5. 【进阶修炼】——改善C#程序质量(6)

    90,不应为抽象类指定public的构造函数. 抽象类即使指定了public的构造函数,也是不能实例化的,编译通不过.抽象类的构造函数应该设定为protected,它的作用应该是初始化自己的成员,以及 ...

  6. ListView 多行拖拽排序

    核心代码:修改ListView的属性,及绑定事件 // 初始化listView1. private void InitializeListView() { listView1.AllowDrop = ...

  7. iframe中跨域页面访问parent的方法

    背景 如上图所示,系统www.a.com/index.html页面中嵌入一个iframe,iframe中访问不同域的www.b.com/index.html 然后b中有个按钮“保存”,想调用父页面a. ...

  8. Kettle 添加对应hadoop版本的支持

    在hdp的官网上有一个ETL工具叫做Talend Open Studio,然后我就下了,并且在群里询问了一下,突然间冒出来一群ETL高手,经高人指点认识了一款叫做Kettle的软件,经过这两天的试用, ...

  9. 关于qt QWebKit/QWebview 使用心得

    当前项目为c/s客户端,采用qt4.8.7,需要使用仪表盘.折线图.柱状图等,曾经使用过qwt和自定义的图形控件,但是都不尽如人意.最近发现ECharts控件不错.为此就要在qt端使用web的技术.为 ...

  10. 清华DNS

    DNS: 166.111.8.28 166.111.8.29 FQ方式:http://www.cnblogs.com/huangshiyu13/p/6227068.html