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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T17:24:12+00:00 2026-05-16T17:24:12+00:00

I currently have a single solution with a single project and this generates executable

  • 0

I currently have a single solution with a single project and this generates executable A.EXE. The project consists of dozens of C# source files, forms, etc.

I now need to generate executables B.EXE and C.EXE as well. B.EXE will use about 95% of the code base for A.EXE (i.e. a subset of functionality). C.EXE will use about 80% of the code base of B.EXE (i.e. another subset).

What is the recommended way to set up Visual Studio and my project/solution for this? I’m using 2010 but I think this is probably a generic Visual Studio question.

My concerns:

  • with the preprocessor there doesn’t appear to be a way to change the name of the output executable. Also excluding entire files may be not be possible and I have to leave the class interfaces and define out the code?

  • with creating projects for B.EXE and C.EXE and linking the source files I am worried that it will be too easy for the three projects to become out of sync. Suppose I add a new file foo.cs to one project I might need to remember to add it to the others as well and remember to use linking for that so the file isn’t copied.

  • I am concerned that dividing my project up into multiple assembles will make it hard to manage, debug and remember what is defined where. I fear that I will end up with a dozen confusing assemblies rather than just a handful.

Thoughts and suggestions are appreciated. I’m sure this is a common problem.

thanks, Andy

  • 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-16T17:24:13+00:00Added an answer on May 16, 2026 at 5:24 pm

    You use a class library to contain the code that is common between each application. In each application, you add a reference to that class library, and you can use all the publicly accessible code in it. (You won’t be able to use internal types, which are the default if you don’t add public).

    The class library should contain the code that will not change between the 3 apps, or in the event of minor changes, you should abstract your code enough to support the differences between them. Copy pasting is a terrible idea, but use the rule of 3 if you must – though better code is once and once only.

    Splitting code up into multiple assemblies doesn’t make things difficult to manage – I find it the opposite. You can consider each class library to be a separate folder of the same project, and you’re just grabbing code from each folder. The difference though, is that you can’t accidentally introduce circular dependencies between assemblies, which helps you design your code in a way that is abstract enough to support all 3 projects, without relying on the code from any particular one of them.

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

Sidebar

Related Questions

So I currently have three unordered lists in my header. This is a single-page
I have inherited a single project in svn: 30Gb in over 300 000 files.
Wondering if anyone has a solution to this 2010 bug. I have a project
I currently have a single solution that contains both the one application developed so
I currently have a single web server hosting multiple WordPress sites which use W3TC.
We currently have a single installation multi-site setup, hosted in Europe, and are looking
I currently have a table which only has a single editable column. I have
Currently I have created a ABCFactory class that has a single method creating ABC
How can I modify this: /services/type/single_dwelling/ to this: /ajax/services/single_dwelling/development Currently I have: linkUrl =
I'm currently managing multiple models from a single SITE MANAGER page. I have the

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.