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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T04:34:58+00:00 2026-05-24T04:34:58+00:00

Explicitly setting dependency in VS2010 between unmanaged C++ project and C# project is honored

  • 0

Explicitly setting dependency in VS2010 between unmanaged C++ project and C# project is honored in VS2010, but dependency is ignored in MSBuild 4.0.

It is impossible to add a reference to unmanaged C++ project from C# project, afaik.

How do i ensure correct build order if a solution contains unmanaged and managed projects?

  • 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-24T04:35:00+00:00Added an answer on May 24, 2026 at 4:35 am

    MSBuild has a bug in it and doesn’t correctly honor project dependencies added at the solution level. Take a look at http://social.msdn.microsoft.com/Forums/en-US/msbuild/thread/80cc6447-b720-4806-8395-7c257b207613/ and https://connect.microsoft.com/VisualStudio/feedback/details/613284/msbuild-4-does-not-respect-build-order-when-building-a-solution

    A posting by Microsoft on the connect page indicates that its a bug in the 64-bit version of MSBuild. Try switching to the 32-bit version to see if that solves the problem.

    If you can’t do that, or it doesn’t work, there are two other options. Neither of them are ideal.

    The first option would be to manually edit the SLN file and change the order the projects appear in the file to match the build order you want. I imagine Victor’s solution would be a much better idea, since additional changes to the solution file could end up overwriting the changes again.

    The second option would be to manually export the MSBuild “metaproject” for the solution and edit the build order directly and add any other customizations you need. From what I’ve read, even at Microsoft they don’t “dogfood” solution compilation – instead, they avoid them completely during builds and use custom MSBuild files instead.

    To generate the metaproj, set the environment variable MSBuildEmitSolution to 1. After running MSBuild on the solution and you should see a “.metaproj” file in the same directory – it contains the script that MSBuild generates in-memory to compile the solution. You should be able to make the necessary edits, check it in, then set the build server to compile it.

    The issue will disappear in the next release of Visual Studio. The Microsoft Connect page has a posting from Microsoft that it will be fixed in the next release, and rumor has it they’re getting rid of .sln files and replacing them with proper MSBuild projects.

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

Sidebar

Related Questions

I'm explicitly setting the CurrentThread.CurrentUICulture to French right before the Component Resource Manager is
I have a Panel that I'm setting visible=true explicitly. The debugger passes over that
I realized, even after explicitly setting the property <property name=cacheLevelName value=CACHE_CONSUMER/> my consumer is
I'm sending a XML content to ActiveMQ from ruby script using stomp I'm explicitly
I'm loading a view page via an $.ajax() call with jQuery. I'm explicitly setting
I want to add Richfaces 3.3.3 to Maven Project, then deploy it to JBoss
I tried using all options in the menu setting Options|Display|Paren Highlighting, but nothing works
is there a method for svn to explicitly create the cached name/password settings for
My colleague insists on explicitly specifying the namespace in code as opposed to using
I know we can explicitly call the constructor of a class in C++ using

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.