views:

559

answers:

3

I'm using a deploy project to deploy my ASP.net web application. When I build the deploy project, all the .compiled files are re-created.

Do I need to FTP them to the production web server?
If I do a small change do I need to copy all the web site again?

A: 

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.

Joel Coehoorn
the .compiled files are in the BIN folder. I have set the "Merge all pages and control outputs to a single assembly" option.So, do you say that I don't need to FTP them?
Eduardo Molteni
No, I'm saying that because you see them at all your deployment probably isn't set up right.
Joel Coehoorn
I don't see nothing wrong. I'm using a Web deployment project and deploying to a temp folder. All the compiled files are generated by the build.
Eduardo Molteni
He's not doing anything wrong, those files are generated by WDP.
John Sheehan
+2  A: 

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

Eduardo Molteni
A: 

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.

Bob