I've been doing a bit of investigative work into .NET 4 side-by-side execution recently and, while I have found out a fair amount, there are still some open questions in my mind.
My queries are really around in-process loading of libraries into client applications. If I have a client application that uses v4.0 of the CLR then my understanding is that it loads up any referenced assemblies and runs them using CLR v4.0 as there is just the single AppDomain running CLR v4.0.
Now, given this siuation what is the difference between having a .NET 3.5 assembly that is running under CLR v4.0 and converting that same assembly to .NET 4 and then loading that version up?
My understanding is that the .NET 3.5 library, when being run in a .NET 4 process, will reference .NET 4 libraries, rather than the .NET 2/3.0/3.5 ones it was originally built against (The Debug > Modules window seems to confirm this). Given this fact and assuming we build both libraries using the C# 4 compiler, is there any difference under the covers?