Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 1079141
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:49:36+00:00 2026-05-16T21:49:36+00:00

Ever since we started upgrading some of our projects to .NET framework 4.0, I’ve

  • 0

Ever since we started upgrading some of our projects to .NET framework 4.0, I’ve been running into a lot of issues regarding the following error:

This assembly is built by a runtime
newer than the currently loaded
runtime and cannot be loaded.

It’s now happening with our installer application. The installer goes through a list of DLL’s and installs the necessary ones on a target machine. Each assembly is loaded into context using

Assembly.LoadFile

The first assemblies in the queue are 3.5. Once the installer picks up a 4.0 DLL and tries to load it using Assembly.LoadFile, I get that error.
It seems as though loading the first DLL sets the precedent as to which “runtime” is currently loaded.

Is there a way I can unload this currently loaded runtime before processing a 4.0 DLL in order to avoid this error?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-16T21:49:37+00:00Added an answer on May 16, 2026 at 9:49 pm

    This will depend on what CLR is the executable that is loading the assemblies running. If it runs on CLR 2.0 you won’t be able to load a .NET 4.0 assembly. So make sure that if you try to load a .NET 4.0 assembly you are running the application on CLR 4.0. You mention the installer application. There’s a possibility to set a launch condition requirement for .NET 4.0:

    alt text


    UPDATE:

    You could also force your executable to be loaded by the CLR 4.0 by putting this in the app.config file:

    <startup>
        <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.0"/>
    </startup>
    

    Because the CLR 4.0 supports loading assemblies compiled against previous versions this will allow you to work around the problem without recompiling the executable against .NET 4.0.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Ever since I started using Xcode, I've experienced extremely annoying problems with Code Sense
So, get this: Ever since I've started using XCode to handle my software development
Greetings all, This has confused me ever since I first started coding in C#.
Ever since I updated FF to 3.6.12 (or at least that's when I noticed
This ones bugged me for a while now, ever since I've opened my Gmail
Some background info: We have several websites running on a 64-bit machine with IIS6
I'm just getting started with OOP PHP with PHP Object-Oriented Solutions by David Powers,
We added a SharePoint BDC model project to a solution in Visual Studio 2010.
Context I have written a TreeList/TreeGrid (i.e. tree with columns) control that inherits the
I am trying to make a Content Slider for my site. I have multiple

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.