RVCT (the RealView compiler) is probably the best compiler to use for NETMF. It is included with the ARM MDK which costs $4,895 MSRP, but I understand that there’s academic pricing available as well. It’s the same compiler included in the highest-end RVDS (Professional) tools which, when combined with expensive ARM debug hardware as Gus alluded, can cost more than $10,000.
Microsoft and members of the NETMF community have done a lot of work to enable GCC support for the newer micros. Quite a bit of this updated GCC compiler support is coming with the new .NET MF 4.2 QFE2 release. GCC won’t give you the tightest and fastest code like RVCT, but it is both free and open source–two pluses for education.
Runtime object code injection techniques like GHI RLP can provide a flexible way to link compiled native code to firmware on the fly. For integrating drivers, adding rich features, porting NETMF and getting the highest flexibility and performance…integrating and compiling your code with the NETMF source tree gives you the ultimate freedom (while giving up some convenience and requiring larger compiles).