Can .NET framework 2.0 assemblies run under .Net framework 1.1?


Short answer: NO.


Long answer: In .Net framework 2.0 many features are added. Many features(Generics first comes to mind) warrant a medata format change. As a result, .Net framework 1.0 and 1.1 will not recognize assemblies compiled with .Net framework 2.0 compilers.

Comments (9)

  1. Varad says:

    But, 1.0 and 1.1 assemblies should work on 2.0, right?

    Obviously 2.0 should be backward compatible!

    Please confirm.

  2. Absolutely. When did you see Microsoft give up backward compatibility?

  3. js says:

    Ahh, but can the Express and VS2005 tools produce Framework 1.1 and/or 1.0 results?

  4. No. They only produce .Net framework 2.0 assemblies.

  5. dotJunkyLove says:

    Now, a really interesting question would be… Lets say a developer is stuck using .NET 1.0 or .NET 1.1 using Visual Studio .NET or 2003. Now there is this new assembly built on .NET 2.0. Will the user using Visual Studio .NET 2002/2003 be able to reference this assembly?

    How can you do this with 1.0 and 1.1 at the same time. Have a 1.0 reference a 1.1 assembly?

    I assume if you build assemblies for customers to use you will always have to build them in the oldest version you care to support in order to allow that assembly to function for that targeted .net framework version. Right?

  6. It is illegal for an assembly with a lower CLR version to reference an assembly with higher CLR version(like v1.0 assembly reference v2.0 assembly). And it is ok for an assembly with higher CLR version to reference assembly with lower CLR version.

    1.1 to 1.0 is exception since 1.1 is considered as a (rather big) service pack to 1.0.

    Since .Net framework is fully side by side, you can carry the right .Net framework redist with you, so you don’t have to stuck with the common denominator. But if you only build shared components, then yes, you probably want to build them in the oldest version you care to support.

  7. Juan Ignacio Gelos says:

    So when a .NET 2.0 app has a reference to an assembly which itself has references to, for example, mscorlib 1.0, System.dll 1.0, etc., what exactly happens? Does the CLR detect those assemblies aren’t installed on the machine and replaces them with 2.0 versions?

  8. Juan,

    All Microsoft Compilers replaces v1.0 framework assemblies references with v2.0 version.