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

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


From my own research, the .compiled files must be copied to the production server, but not needed to copied every time

from Rick Strahl excellent blog:

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


You can get rid of the .compiled files by using the aspnet_merge tool with the -r option.

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.


There's nothing special about .compiled files: it's just the actual file with a .compiled extension on the end so that nothing happens if you accidentally double click it.

But if you're seeing .compiled files, you're publishing your app in such a way that it expects to be formally installed- it's not enough to just copy things to production. You have to run the installer program too. If this is an app you know is already deployed, that seems a bit unnecessary.