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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:45:35+00:00 2026-05-17T18:45:35+00:00

I have two projects; A and B, where B needs to use some classes

  • 0

I have two projects; A and B, where B needs to use some classes that are in project A. Hence, I added B to A’s solution, and in B I added a reference to project A.

Is that sensible? Or should I rather put those classes in a class library?

I see that if I further want to open form/program B from a menu option in project A, then A needs a reference to B. Which would not be possible if B already had a reference to A. However if I use the class library for the common classes, then it’s ok as B doesn’t need the A reference.

Does this sound logical? It would be nice to know what are typical reasons for putting projects in the same solution, and if it’s advised to use libraries aggressively to refactor common code between two projects, even if it’s just a couple of classes.. Yet I’ve never made my own library, so a bit unsure on when to use it. If you have some principles would be nice to hear..

  • 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-17T18:45:36+00:00Added an answer on May 17, 2026 at 6:45 pm

    Generally, classs libraries are used for common functionality between multiple projects. In other words, exactly what you’re dealing with. So you should pull it out into a class library.

    From there, there are two possibilities: if the common functoinality is always going to be the same between the two projects, then it should be a separate project. If it could change for one and not the other then copy it into both projects. You should still refactor it into a class library becasue that will make it easier initially. Note also that in the first case there is going to be another project to be maintained with its own release schedules and management headaches.

    Generally, multiple projects in a single solution are a user interface and various libraries and other supporting projects. If there is more than one user interface they are usually realted to the same system, such as a user interface and an admin interface, or possibly interfaces for different platforms.

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

Sidebar

Related Questions

I have two ActionScript projects in Flash Builder 4.5. The second project needs to
I have two projects in the same Subversion repository. They both use some standard
I have two projects in my solution. First project is web site (actually web
We have a solution with multiple web projects, and there are some pages that
I have a situation: In a single Solution I have two Projects. I need
Need to add two same name .csproj class libraries in my solution.Have two project
I have two projects.One project is build in MVC asp.net and the other project
I have two projects in my Solution. One implements my business logic and has
I inherited a project that needs to be mutithreaded. There is three major classes
I have few own APIs with around 2000 classes overall. Some of them use

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.