Within our Unity projects we are using a collection of .NET assemblies that are compiled from our source code within VS2010. Ideally we would compile these assemblies against the supplied Unity/Mono .NET subset core assemblies within Unity, but VS does not allow this, so they are compiled against the standard .NET 3.5 assemblies.
We only want to use the 2.0 subset option for Unity Windows, as we want to make it cross compatible with Web, iPhone, Android, etc.
If a script references a type within these assemblies, that in turn directly references a system type not available in the Mono 2.0 subset assemblies, a compile error is raised within the Unity editor.
However, more indirect references (script -> assembly A -> assembly B -> standard .NET type not available in subset) works within the editor! Adding some logging I noticed it is resolving the type from the full Mono directory (\Mono\lib\mono\2.0), rather than the subset directory (\Mono\lib\mono\unity).
This obviously fails once the project has been deployed and run externally to the editor. Additionally, reflecting over one of these assemblies will cause similar issues on the deployed version, but not within the editor.
So firstly, you may have a possible bug in the compiler and/or type/reference resolving. Secondly, it is rather tedious trying to work out what is and isn't available by deploying, looking at the log, and seeing a general 'System.Reflection.ReflectionTypeLoadException: The classes in the module cannot be loaded' exception. Could Unity3D staff possibly provide me with documentation of what is available in the 2.0 subset build option? Or if someone has a better idea of how to approach this task, it would be greatly appreciated.