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

  • Home
  • SEARCH
  • 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 6591613
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T17:26:50+00:00 2026-05-25T17:26:50+00:00

I am running into a weird issue with my managed C++ assembly. Even though

  • 0

I am running into a weird issue with my managed C++ assembly. Even though I have the C# project and the managed C++ (DLL) project set to target .NET 3.5, when I compile the managed assembly its “Runtime Version” is 2.0.

I am trying to use the same assembly across a .NET 3.5 project and a .NET 4.0 version of a CSScript and the CSScript refuses to run with a .NET 2.0 assembly (“Runtime Exception: Mixed mode assembly is built against version ‘v2.0.50727’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information.”).

I managed to localize the problem to the following (all work done in VS 2008):

  1. I create a C# project targeting .NET 3.5.
  2. I create an empty C++ project in the same solution.
  3. Add an empty .cpp file to the C++ project.
  4. Change the C++ project properties: Configuration Type = Dynamic Library (.dll), Common Language Runtime support = Common Language Runtime Support (/clr), and make sure that Common Properties’ “Targeted Framework” is set to 3.5
  5. Compile the C++ project and add it as a reference to the C# project.

When you look at the properties of the reference in the C# project you will see the “Runtime Version” is v2.0.50727. My question is, what the hell?

Why is the runtime version 2.0? I set everything to 3.5 … How can I force the managed C++ project to compile against .NET 3.5?

Thanks,
Marek

  • 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-25T17:26:51+00:00Added an answer on May 25, 2026 at 5:26 pm

    Your “fix” won’t actually fix the problem.

    Runtime Exception: Mixed mode assembly is built against version ‘v2.0.50727’ of the runtime and cannot be loaded in the 4.0 runtime without additional configuration information

    You need to use the 4.0 runtime to avoid this, no point in even trying for some mythical “3.5” version. For that, you need to compile using the VC++ 2010 compiler. Since you need to use it in a .NET 3.5 application, that’s a non-starter.

    Try looking into that “additional configuration information”. See this question and also this one.

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

Sidebar

Related Questions

I'm running into a weird issue with Entity Framework in .NET 3.5 SP1 within
I've run into a weird issue with a site running ASP.NET MVC on IIS7.
I have a Custom Listview but i'm running into a weird issue when I
I'm running into a weird issue that I'm struggling to figure out what's causing
I'm running into an issue where I have a FileUpload control in an UpdatePanel.
Hey guys I'm running into a weird issue.. Basically, a user logs into a
I'm running a weird issue here. I have code that makes jquery ajax calls
Alright, so I'm running into an issue with my code. What I have done
So I'm running into this weird issue. When I'm developing locally, and I run
I am running into this weird issue where I am iterating over a list

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.