关于asp.net:是否需要将.compiled文件复制到生产服务器?

关于asp.net:是否需要将.compiled文件复制到生产服务器?

Do I need to copy the .compiled files to the production server?

我正在使用一个部署项目来部署我的ASP.net Web应用程序。
当我构建部署项目时,将重新创建所有.compiled文件。

我需要将它们通过FTP传输到生产Web服务器吗?
如果做些小改动,是否需要再次复制所有网站?


根据我自己的研究,必须将.compiled文件复制到生产服务器,但不必每次都复制

来自Rick Strahl的优秀博客:

The output from the merge utilitity
can combine all markup and CodeBeside
code into a single assembly, but you
will still end up with the .compiled
files which are required for ASP.NET
to associate the page requests with a
specific class contained in the
assembly. However, because the file
names generated are fixed you don’t
need to update these files unless you
add or remove pages. In effect this
means that in most situations you can
simply update the single assembly to
update your Web.
Source


您可以使用带有-r选项的aspnet_merge工具来摆脱.compiled文件。

Removes the .compiled files for the main code assembly (code in the App_Code folder). Do not use this option if your application contains an explicit type reference to the main code assembly.


.compiled文件没有什么特别的:它只是末尾带有.compiled扩展名的实际文件,因此,如果您不小心双击它,则不会发生任何事情。

但是,如果您看到的是.compiled文件,那么您发布的应用程序应以期望正式安装的方式发布-仅将内容复制到生产环境中是不够的。 您也必须运行安装程序。 如果您知道该应用已经部署,则似乎没有必要。


推荐阅读

    linux文件io命令?

    linux文件io命令?,系统,设备,时间,地址,平均,信息,服务,工具,报告,网络,嵌入

    改文件linux命令行?

    改文件linux命令行?,地址,系统,工作,信息,数字,文件,命令,设备,密码,权限,lin

    拷贝文件夹linux命令?

    拷贝文件夹linux命令?,系统,地址,服务,信息,密码,情况,单位,项目,命令,文件,l

    进入文件夹linux命令?

    进入文件夹linux命令?,系统,密码,终端,目录,标的,一致,传播,图片,环境,工作,l

    打包文件命令linux?

    打包文件命令linux?,系统,时间,工具,名称,命令,文件,目录,格式,表示,详细信

    linux删除命令文件夹?

    linux删除命令文件夹?,系统,数据,通用,文件夹,命令,文件,环境,百度,不了,名

    linux文件io命令?

    linux文件io命令?,系统,设备,时间,地址,平均,信息,服务,工具,报告,网络,嵌入

    linux中文件编辑命令?

    linux中文件编辑命令?,系统,工作,工具,信息,地址,发行,命令,第一,检测,基础,l

    linux文件格式的命令?

    linux文件格式的命令?,设备,命令,系统,文件,标准,代码,情况,电脑,平台,数据,l

    linux命令行编译文件?

    linux命令行编译文件?,代码,系统,项目,工具,网上,手机,电脑,地址,官网,文件,L

    linux下文件写入命令?

    linux下文件写入命令?,系统,信息,文件,名字,电脑,软件,目录,命令,内容,指令,l

    linux命令备份文件夹?

    linux命令备份文件夹?,设备,系统,文件,命令,备份,情况,做好,名字,灵活,数据,l

    linux服务器基本命令?

    linux服务器基本命令?,地址,系统,设备,网络,工作,标准,信息,电脑,命令,密码,l

    linux服务器下载命令?

    linux服务器下载命令?,服务,密码,系统,档案,工具,网络,公共,百度,地址,认证,l

    linux命令deb文件?

    linux命令deb文件?,软件,位置,第一,系统,中心,工具,信息,发行,网站,管理系统

    linux文件夹删除命令?

    linux文件夹删除命令?,系统,命令,不了,档案,名称,通用,文件夹,文件,目录,指

    linux文件类基本命令?

    linux文件类基本命令?,系统,设备,工具,工作,基础,命令,文件,发行,管理,网络,L

    linux文件结构命令?

    linux文件结构命令?,系统,数字,技术,设备,传播,第一,管理,数据,发展,目录,Lin

    linux建个文件夹命令?

    linux建个文件夹命令?,系统,名字,命令,文件,文件夹,环境,不了,名称,数据,密

    linux命令添加文件?

    linux命令添加文件?,工作,简介,数据,系统,文件,命令,操作,文件名,内容,终端,l