Framework versioning issues

  • Thread starter Thread starter Conceptor
  • Start date Start date
C

Conceptor

Hi all,

1) Can an assembly built with framework 1.1 instanciate objects from another
assembly built with framework 2.0 or 3.5? Are there any
restrictions/limitations?

2) Can an assembly built with framework 2.0 or 3.5 subclass objects from
another assembly built with framework 1.1? Are there any
restrictions/limitations?

Thanks!

-C.
 
Conceptor said:
1) Can an assembly built with framework 1.1 instanciate objects from another
assembly built with framework 2.0 or 3.5?

Yes, but only if the 1.1 assembly is being loaded by the 2.0 CLR. If the
assembly is an .EXE you have .NET 1.1 installed, you must use the
<supportedRuntime> element in the configuration file to specify that it must
run as 2.0. Otherwise the 1.1 CLR will start and this cannot load 2.0
assemblies.
Are there any restrictions/limitations?
No.

2) Can an assembly built with framework 2.0 or 3.5 subclass objects from
another assembly built with framework 1.1? Are there any
restrictions/limitations?
Yes, and no.

One thing you may have to look out for is minor (and not so minor) semantic
changes in framework methods. For example, in 1.1, an unhandled exception
was discarded; in 2.0 it terminates the application. Your 1.1 code will play
by the 2.0 rules.
 
Back
Top