Can the .NET CLR 4.0 execute CLR 2.0 code without application recompilation?

Posted on 2011-05-11
Last Modified: 2012-05-11
Folks -

I'm getting ready to deploy the .NET Framework 4.0 in my environment which includes the CLR 4.0.  I'd like to stop distribution of .NET 3.5 SP1 which includes CLR 2.0.  Am I shooting myself in the foot?

Can the CLR 4.0 in .NET 4.0 run CLR 2.0 code without recompilation?  Or do I need to continue distribution of BOTH Frameworks?

The managed libraries from 3.5 are in 4.0, along with the new 4.0 features, but the CLR is a whole new version and that's what worries me.

Any input would be appreciated.  Thanks!
Question by:amendala
    LVL 4

    Accepted Solution

    The CLR 4.0 cannot run CLR 2.0 code!

    If the application is in .NET 4.0, you will need only CLR4, but if the application is in any version below 4, you will need the CLR version greater than or equal to (Below 4) the Target version of the app.
    LVL 18

    Expert Comment

    In addition
    you can reduce .NET 4 sizes by Microsoft .NET Framework 4 Client Profile

    Author Closing Comment

    Precisely what I needed, thank you.

    Featured Post

    Courses: Start Training Online With Pros, Today

    Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

    Join & Write a Comment

    A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
    Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
    An introduction to basic programming syntax in Java by creating a simple program. Viewers can follow the tutorial as they create their first class in Java. Definitions and explanations about each element are given to help prepare viewers for future …
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now