什么时候编译和构建,什么时候不使用.NET? [英] When to Compile and Build and when not for .NET?

查看:94
本文介绍了什么时候编译和构建,什么时候不使用.NET?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

关于何时需要重新编译整个.NET应用程序,我有两个一般性问题:具体来说,只需上传哪个文件就可以:

I have a couple of general questions regarding when it is necessary to recompile an entire .NET Application: Specifically, what file is ok to simply upload:

  1. 我知道对web.config的任何更改都不需要重新编译,并且该文件可以简单地上传到任何开发站点.

  1. I know that any change to the web.config does not require re-compilation, and that file can simply be uploaded to whatever development site.

对.css文件的更改需要重新comipile吗?或者我可以简单地将该文件上传到开发站点?

A change to .css file require re-comipile? Or can I simply upload that file to development site?

对.aspx文件的更改需要重新编译?或者我可以简单地将该文件上传到开发站点?

A change to .aspx file require re-compile? Or can I simply upload that file to development site?

对.cs文件的更改需要重新编译?我想是的.

A change to .cs file require re-compile? I would think yes.

对任何.js文件进行更改是否需要重新编译应用程序?或者我可以简单地将该文件上传到开发站点?

A change to any .js file requires re-compile of application? Or can I simply upload that file to development site?

推荐答案

对任何静态资源的更改都不需要您重新编译应用程序-其中包括 .css .js

Changes to any static resources do not require you to recompile the application - this includes .css, .js, images and such.

更改为 .aspx / .master 页面的确会重新编译-但这是由IIS自动完成的.

Changes to .aspx / .master pages do get a recompilation - but this is done automatically by IIS.

更改为 web.config 不需要重新编译,因为这是配置-它只需要重新加载,IIS就会通过回收应用程序来完成.

Changes to web.config do not require a recompilation as this is configuration - it simply needs to be reloaded, which IIS will do by recycling the application.

.cs 文件的更改将需要重新编译-否则,如果使用Web应用程序项目,则网站dll文件将不是最新的.在一个网站项目中,您可以使用 app_code 目录-IIS将自动重新编译它.

Changes to .cs files will require a recompilation - otherwise the web site dll file will not be up to date if using a web application project. In a web site project, you can use the app_code directory - IIS will automatically recompile it.

这篇关于什么时候编译和构建,什么时候不使用.NET?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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