当发布一个ASP。NET应用程序,我应该更改构建类型以在Visual Studio配置管理器中释放吗?

时间:2022-09-11 03:31:45

For my production sites I usually change the "debug" flag in the Web.Config to "false". But I always publish my sites with the Configuration Manager set to "Debug". Should I change this setting too?

对于我的产品站点,我通常更改Web中的“debug”标志。配置“false”。但是我总是发布我的站点,配置管理器设置为“Debug”。我也应该改变这个设置吗?

4 个解决方案

#1


9  

Yes, you should - though if it makes a difference is dependent on how your website is coded. Only precompiled sites (Web Application Projects) or Class Libraries in the same solution will care. ASP.NET sites (Website Projects) will be compiled on the server, and will check web.config for it's debug setting.

是的,你应该这样做——不过如果你的网站是有区别的,这取决于你的网站是如何编码的。只有在相同的解决方案中预先编译的站点(Web应用程序项目)或类库才会受到关注。ASP。NET站点(网站项目)将在服务器上编译,并将检查web。配置它的调试设置。

#2


8  

Yes, as suggested in MSDN :

是的,如MSDN所建议:

Enabling debug mode will greatly affect the performance of your ASP.NET application. Remember to disable debug mode before you deploy a release application or conduct performance measurements.

启用调试模式将极大地影响您的ASP的性能。网络应用程序。在部署发布应用程序或执行性能度量之前,请记住禁用调试模式。

#3


4  

Yes, absolutely. Setting it to release will compile code without debugging symbols and with the right conditional compilation (i.e. #if DEBUG).

是的,当然。将其设置为release将编译代码,无需调试符号和正确的条件编译(例如,#if DEBUG)。

#4


3  

Yes Release will compile a smaller DLL

Yes Release将编译一个更小的DLL

#1


9  

Yes, you should - though if it makes a difference is dependent on how your website is coded. Only precompiled sites (Web Application Projects) or Class Libraries in the same solution will care. ASP.NET sites (Website Projects) will be compiled on the server, and will check web.config for it's debug setting.

是的,你应该这样做——不过如果你的网站是有区别的,这取决于你的网站是如何编码的。只有在相同的解决方案中预先编译的站点(Web应用程序项目)或类库才会受到关注。ASP。NET站点(网站项目)将在服务器上编译,并将检查web。配置它的调试设置。

#2


8  

Yes, as suggested in MSDN :

是的,如MSDN所建议:

Enabling debug mode will greatly affect the performance of your ASP.NET application. Remember to disable debug mode before you deploy a release application or conduct performance measurements.

启用调试模式将极大地影响您的ASP的性能。网络应用程序。在部署发布应用程序或执行性能度量之前,请记住禁用调试模式。

#3


4  

Yes, absolutely. Setting it to release will compile code without debugging symbols and with the right conditional compilation (i.e. #if DEBUG).

是的,当然。将其设置为release将编译代码,无需调试符号和正确的条件编译(例如,#if DEBUG)。

#4


3  

Yes Release will compile a smaller DLL

Yes Release将编译一个更小的DLL