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 899665
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:15:25+00:00 2026-05-15T15:15:25+00:00

I have a VS2008 Professional solution that I tried to convert to VS2010 Professional

  • 0

I have a VS2008 Professional solution that I tried to convert to VS2010 Professional (RTM from MSDN download) today and I am experiencing some problems with some unmanaged and managed C++ DLLs that are referenced by a C# application.

The C# application is set to target .NET 3.5 (as it was in the VS2008 version) but when I try and compile it I get a lot of warnings like:

The primary reference “xxxx.dll” could
not be resolved because it had an
indirect dependency on the .NET
Framework assembly “(various assembly
names)”, Version 4.0.0.0 … which has
a higher version “4.0.0.0” than the
version “3.5.0.0” in the current
target framework

and ultimately I get a failure to build.

From this I understand that it is a mismatch in .Net framework version. So I look at the properties of the unmanaged C++ DLL project and under “Common Properties->Framework and References” I can see “Targeted framework: .NetFramework, Version=v4.0”

So I go WTF!?!?!?, why does a pure C++ DLL now target a .Net framework when it sure as hell didn’t in the VS2008 version. I then added on to that exclamation as there appears to be no way to change this. I also look at the managed C++ and see the same thing: targeting .Net version=v4.0 and again no way to change this at all.

In the C++ General properties there is an entry for “Common language runtime support” and I have set this to “No common language run time support” but that hasn’t seem to have done anything.

So I have two questions:

  1. Why has my pure C++ DLL now been tagged as targeting a .Net framework?

  2. How can I change/remove this targeting?

Solution

As per Hans’ reply and the link he supplied I now see that I have 3 choices:

  1. Stay at VS2008 and everything works

  2. Keep both VS2008 SP1 and VS2010
    installed so that I can have .Net
    3.5 c# applications and c++ managed code as per the link supplied by Hans.

  3. Move everything to VS2010 and move
    to a minimum of .Net 4.0 for all my
    c# apps

I am really annoyed to have to make that choice as MS has deliberately chosen to break functionality when moving from VS2008 to VS2010. This is not the sort of behavior I expected. I was expecting to convert the project and have it compile with no issues in the same manner that moving from VS2005 to VS2008 worked.

Fortunately I do have a need to go to .Net 4.0, but I just wasn’t expecting to have to do it so soon.

Update

I decided to move to .Net 4 framework and encountered problems with referencing managed c++ projects from c# projects. I was getting errors like the following when trying to add the reference to the c++ managed code project

A reference to ‘myproj’ could not be
added. An Assembly must have a ‘dll’
or ‘exe’ extension in order to be
referenced.

Google lead me down the path to “cli c project cannot be referenced from c project allowing only assembly dll” which turned up that there was an extraneous “\” in the output path of the managed c++ project. The original VS2008 output path was specified as

$(SolutionDir)\$(ProjectName)\$(Configuration)\

But in the VS2010 project the SolutionDir macro has a trailing “\” (or the VS2008 version didn’t care about it) giving a path like

c:\projects\thisproject\solution\\projectname\configuration\

And VS2010 barfed over that path when trying to add a reference to the managed c++ code. My solution was to change the output path to be

$(SolutionDir)$(ProjectName)\$(Configuration)\

And now I am (sort of) happy

  • 1 1 Answer
  • 1 View
  • 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-15T15:15:26+00:00Added an answer on May 15, 2026 at 3:15 pm

    Keep your eyes on the ball, the warning you get is for a managed C++ assembly. And the platform target setting for an unmanaged DLL is of no consequence, it won’t use any .NET references while being built.

    Yes, they could not make the platform target setting editable in the C++ IDE, the VS2008 tool chain is required to build C++/CLI assemblies for 3.5. This blog post explains the workaround. You can upvote this feedback article if you’re unhappy with that.

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

Sidebar

Related Questions

I have the professional versions of VS2008 & VS2010. I wish to add a
I have both VS2008 and VS2010 Setup projects that create .MSI files. On server
I have a project created with VS2010. I am running the project from VS2008.
I've just installed VS2008 and have run into a problem that I'm sure can
I've done some recovery activities with my computer. Now, I've re-installed VS2008 professional edition.
I have VS2008 and VS2010 installed on my machine. Both works fine when there
I have VS2008 and VS2010 on brand new Win7. Can I install VS2005 afterwards
I have a VS2008 C++ project which currently I compiled on VS2010. it contains
I have a .NET project (VS2008 .NET 3.5) that builds an exe. I have
I have installed VS 2010 Professional on a machine that already had 2008 Professional.

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.