C#中的Debug和Release之间有什么不同 [英] what is different beetween Debug And Release in C#

查看:594
本文介绍了C#中的Debug和Release之间有什么不同的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好
当我想执行程序时,我看到Exe按钮的一侧有2个项目(在VS中为绿色播放),其中有Debug and Release ....

调试和发布之间有什么不同?

请帮助我

非常感谢

[edit]删除了不必要的pre标签[/edit]

hi all
When I Want Execute My Program I See 2 Item In Side Of Exe Button(Green Play In VS) there are Debug And Release ....

what is different beetween Debug And Release?

Please Help Me

Thanks A Lot

[edit] unnecessary pre tags removed [/edit]

推荐答案

它们不过是构建的两种不同配置,默认情况下是从项目模板创建的.您可以添加自己的或替换它们.

想法是为了不同的目的而拥有两组或不同模式的项目选项.这些集合被命名和称为配置. MSBuild.EXE(但不是任何具体配置)和项目文件格式(XML架构)都知道配置的概念.您可以指定要构建哪一个.

两种默认配置Debug和Release涵盖了开发周期的两个基本需求:Debug适用于开发和调试,在部署软件时使用Release.请理解,对于不同的配置,可能会有不同的运行时行为(但是很糟糕,如果您允许这种情况),那么这两种配置都需要进行一些测试.

如果您想了解它们之间有何不同之处的所有详细信息,请查看项目的属性"并比较它们的不同配置.

-SA
They are nothing more then two different configurations for the build, those created by default from the project template. You can add your own ones or replace them.

The idea is to have two or mode different sets of project options for different purposes. These sets are named and called configurations. The notion of configuration is known to MSBuild.EXE (but not any of concrete configurations) and project file format (XML schema); you can specify which one to build.

The two default configurations, Debug and Release, cover two basic needs of the development cycle: Debug is good for development and debugging, Release is used when you deploy your software. Please understand that it is possible to have different run-time behavior for different configurations (but very bad is you allow such cases), so both configurations need some testing.

If you want to know all the detail on how they are different, see project''s Properties and compare them for different configurations.

—SA


Solution1的补充,调试版本提供了PDB文件,该文件用于在运行时调试应用程序.请参阅Microsoft调试器.

另外,由于Debug版本正在加载许多其他信息,因此强烈建议在生产环境中部署时使用发行版,以获得更好的性能.

谢谢
rushi
Addition to Solution1, debug version giving PDB file which used to debug the application at runtime. Refer Microsoft debugger.

Also because Debug version is loading lot of other information and it is strongly advisable to use release version when you are deploying on production to get a better performance.

thanks
rushi


这篇关于C#中的Debug和Release之间有什么不同的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆