There are a number of requests queued up in Spark that deal with the same general realm of precompilation… I think the first was from Chadly who was asking about compiling everything up-front, and as he mentions it’s exactly the type of thing that opens the door to building all of your views into a deployable assembly.

The next was from ilog2000 who mentioned that Spark can’t function in a partially trusted (shared) environment. It’s a restriction the framework is imposing on class libraries that attempt to generate, compile, and load assemblies. Reasonably enough precaution I suppose.

So that’s the most recent thing that’s being implemented. The castle version was a bit more complex - because there are the layout and area attributes to watch out for (not to mention view components) - but a new release should come together in a few days.

But it is convenient. In fact just earlier today when I added a “compile all views” unit test to the current project I’m on at the office it showed one place where a status/info page was out of date (it wouldn’t compile because the layout had changed) and another place where a handful of obsolete view files were sitting around on disk for no reason. Plus from this point resharper and the continuous-integration will be able to point out any place someone has broken a view.

I suppose at that point you could also unit test the actual view classes themselves - instantate, hand them view data, and render - although I’m not sure if there’s a lot of value in doing that.