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

The Archive Base Latest Questions

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

This probably sounds like a stupid question, but I’m going to give it a

  • 0

This probably sounds like a stupid question, but I’m going to give it a shot anyway.

So in Visual Studio, you can’t have two projects X and Y such that X references Y and Y references X.

In general, I can totally understand how having a circular dependency can be problematic, for a variety of reasons.

But is it really not possible to compile two projects that are interdependent in this way? It seems to me that it must be possible, since (in my mind — maybe I’m completely off-base about this) having two mutually dependent assemblies is really not so different from having two mutually dependent classes — a case which is legal and can be compiled.

It would make sense to me if you said, “two assemblies cannot depend on each other because the compiler could not compile one before the other”; except that it seems you could make the same argument for two classes within the same assembly, and clearly the compiler can deal with this scenario just fine.

Basically the reason I’m asking is not that I have some desperate desire to do this thing that I know is generally ill-advised anyway. Specifically I’m wondering because it would be nice if I could have two projects — say, MyProjectCS and MyProjectVB — that existed basically as two mutually dependent parts of a single unit, and were only separate because certain parts were written in C# and other parts were written in VB.NET.

So, my question is (yikes, three-fold):

  1. Is it possible to enable this behavior (in Visual Studio, or elsewhere, for that matter)?
  2. If it’s not possible within any IDE, is it at least theoretically possible, or could mutually dependent assemblies not possibly exist?
  3. If it’s not even theoretically possible, why not? In other words, how are mutually dependent assemblies different from mutually dependent code within a single assembly?
  • 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-15T17:12:57+00:00Added an answer on May 15, 2026 at 5:12 pm

    I don’t know how to do it in an IDE; however it is possible to construct via a compilicated build process.

    You will need:

    1. Assembly A
    2. Assembly B
    3. Stub Assembly B

    where Stub Assembly B contains the public classes and public methods of Assembly B and the same AssemblyInfo.* and references the same public key.

    Build order:

    1. Compile Stub Assembly B
    2. Copy Stub Assembly B to the output dir of Assembly B
    3. Build assembly A
    4. Build assembly B

    Notice that you cannot have direct loop references of the types in the method signatures; however you can have effective loops by casting through object.

    NOTE:

    ilasm can compile true mutually recursive assemblies as somehow it can resolve types that don’t exist at compile time.

    FURTHER:

    the aspnet_compiler seems to be able to mix different languages in the same project (who knows how).

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

Sidebar

Related Questions

No related questions found

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.