Introduction
The web project model changed in a number of ways between VS 2003 and VS 2005. You just still have two options, namely “In Place Compilation” and “Site Precompilation”. The first one is the default and standard compilation method. It’s also the only one, standard provided by the setup project.
In Place Compilation:
ASP.Net 2.0 will compiles each page on first use. This means that when creating a setup, your .cs/.vb files will also deployed. However, it’s very easy to use in development stage.
Site Precompilation:
This will precompile your complete site. To do this you have to use a new utility: ASPNET_COMPLER.
aspnet_compiler –f –v /whatsnewinaspnet c:\temp\deploy
After the compilation you will also find .compiled files. These are marker files and should not be deleted.
The last option is, in our opinion, the best. With this option, no .CS files are deployed.
More info can found here:
http://west-wind.com/weblog/posts/2128.aspx
http://www.odetocode.com/Articles/417.aspx
Lucky for us, Microsoft has also seen that sites are deployed in a very different way than “In Place Compilation”. So they have released a new kind of Web Deployment Project as an add-in. This add-on provides a lot of additional deployment features and capabilities that complement the built-in web project support in the product.
The VS 2005 Web Deployment Project download adds a number of features that integrate nicely inside VS 2005 including:
- Control the number of assemblies generated by the pre-compiled web project
- Customize the web.config at deployment
- Use the full power of MSBuild
- …
You find the installation of the add-on on following location http://msdn.microsoft.com/asp.net/reference/infrastructure/wdp/default.aspx
For a complete walk-through using the VS 2005 Web Deployment Project, I can only recommend the article "VS 2005 Web Deployment Projects" on ScottGu's blog.