On of the most painful aspects of working with .NET is the time to retrieve feedback after writing tests and waiting to see the red/green result. The obvious overhead is the compilation time, and this is especially apparent when updating a large solution where files in several projects have changed.

Unfortunately, the solution coming from the guys in the Microsoft camp seems to spend excessive amounts on quad core machines with SSD drives. While this is *an* option, I started to wonder if there were other alternatives coming from other development communities. Now obviously, looking at the Ruby or Python worlds would be a little pointless, as they live in blissful interpreted language heaven, but what about Java?

One advantage that Java has is it’s compilation model, here each java file is compiled to a corresponding class file holding it’s intermediate data representation ready to be interpreted by the VM. In order to reduce the number of class files floating around Java supports packaging these files into a JAR/WAR archives. What this essentially means is that it is possible to compile only the files that have changed and replace the individual class files. Couple this with the fact that most Java IDE’s support compilation on save of a file (which I *think* on success overrides the .class files) , this leads to fast compilation and code that is usually ready to execute at any given time.

In the .NET world compilation does’t happen at this level of granularity, instead all files within a given MSBuild project are compiled to a single dll assembly, making it quite difficult to only update the parts that have changed.

In my mind the only solution is to determine the minimum requirement for a given test class and ONLY compile these files, instead of the whole world. I’m unsure how this could be accomplished other than parsing the text of a given .cs file and its corresponding solution+project files to resolve dependencies. Even in this case there is no way to determine dependencies resolved via reflection (aka IoC injected dependencies). I would love to see the day that c# has lightning fast test feedback cycles, and am open to any ideas on how to achieve this.