Earlier this week I held a three day ASP.NET 2.0 training session for one of our clients who are early adopters of the technology. Two of the topics we discussed were build providers and the code separation models. Build providers in ASP.NET 2.0 is a brilliant solution for the ever returning question of
“what is the easiest way to deploy my code?”
Having a code folder where you can drop off your C# or Visual Basic.NET source files and have them built automatically is a great feature.
Few people are aware that you can exploit the compilation model in ASP.NET 1.x to achieve something similar. If you add an ASPX page the virtual folder and make its
src attribute point to a source file, this file will be compiled when ASP.NET detects that it has changed. This isn’t as elegant as the ASP.NET 2.0 code folder, but it is a solution if you need automatic, server side compilation of classes.