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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T03:08:41+00:00 2026-06-15T03:08:41+00:00

I have two projects in the same VS 2010 solution. They are reusing same

  • 0

I have two projects in the same VS 2010 solution. They are reusing same code and I want VS2010 to build both projects’ Executables into the same output folder.

Apparently this is not trivial even though http://msdn.microsoft.com/en-us/library/ms165411.aspx says it is.

One build process deletes previously build one (or doesn’t even copy first build executable into the folder) so I just have one executable from the project built last.

If built separately, both compile and output respective executables separately.
One project is dependent on the other one (to resolve access conflicts to the reused OBJ files, since one probably holds the handle for too long while the other tries to build).

A mystery I would appreciate a bit of help.

  • 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-06-15T03:08:42+00:00Added an answer on June 15, 2026 at 3:08 am

    You can redirect visual studio to any folder you want by going to the project property pages and then changing the output directory field of both folders to the same location (either in absolute or relative location). The two project cannot have the same name (actually the name of the executable must be different as perhaps some other auxiliary files generated) or else generating one project will erase the other.

    Above I answered your question, but I believe that you are approaching things from the wrong point. if you have common code, create a library project/folder. Place it somewhere and add the source code itself to each project, so each project can use it, or you can actually generate the lib file itself with a header containing prototypes of the functions in the lib file, and then use a header file and the lib file in each project.
    Use Visual Studio’s VC++ Directories tab to point to the lib folder and to the header file.

    This is usually the right approach which can avoid headaches (if you accidentally change source code in one project and it affects the other one. With lib file you’re forced to make a bit more thoughtful changes).

    Another benefit is that you don’t have to recompile it each time, even if you clean it (you will always rebuild if you clean and use source code).

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

Sidebar

Related Questions

I want to have two projects that build off the same source files, with
I would like to build two C++ projects in the same solution in Visual
I have a solution in Visual Studio 2010, containing two projects: A static library
I have two projects in a VS 2010 solution: Data and DataForm. In my
I have a VC++ 2010 solution containing two projects: ProjectX and ProjectXTests. In the
I have two projects with almost the same configuration in visual studio 2010 One
I have two projects in the same solution, VS2k10. One is a class library,
I have two projects, and they have some headers in common, so they both
I have two projects in the same solution. One is an ASP.NET MVC 2
I have two projects in the same solution, a service and a consumer app.

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.