Can you use a .NET 4.0 dll in a 3.5 project?
+2
A:
Nope. You can use a .Net 3.5 assembly in a 4.0 project, but not the other way around.
Chris Lively
2010-09-24 21:19:54
+3
A:
No you can't. An assembly compiled against .NET 4.0 can be loaded only by the CLR 4.0. On the other hand the CLR 4.0 can load assemblies compiled against .NET 3.5.
Darin Dimitrov
2010-09-24 21:20:12
CLR 4.0 loading a 3.5 assembly surprised and confused me the other day. Scratched my head over that one for a bit.
Jim Mischel
2010-09-24 21:29:59
@Jim, why? If this wasn't possible I cannot even imagine ever migrating to .NET 4.0. Microsoft have always done a good job at keeping backwards compatibility when releasing new versions of the framework/CLR.
Darin Dimitrov
2010-09-24 21:36:52
I don't know why it surprised me. In retrospect, it shouldn't have. But for some reason at the time I didn't expect it.
Jim Mischel
2010-09-24 21:41:34