none
How to use class declared other project in the same solution RRS feed

  • Question

  • I need to use a class(inherited from From class) declared other EXE project from DLL project in the same solution

    My Solution consists of 1 exe,  and 1 dll like following.

    I can add reference dll from exe.

    However, if try Add Reference, it shows only dlls, not exes.

    How to reference the class in the exe project from dll project?


    • Edited by Jeff0803 Wednesday, March 4, 2020 4:34 AM
    Wednesday, March 4, 2020 4:29 AM

Answers

  • You can't do that. I suggest you make another dll and move the class into that.
    • Marked as answer by Jeff0803 Wednesday, March 11, 2020 11:59 PM
    Wednesday, March 4, 2020 4:43 AM
  • Hi Jeff0803,

    Thank you for posting here.

    This is not allowed in CLR.

    You can create two ClassLibrary projects and then reference the first one in the second project, but we cannot reference the exe anyway.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Thursday, March 12, 2020 12:00 AM
    Wednesday, March 4, 2020 7:03 AM

All replies

  • You can't do that. I suggest you make another dll and move the class into that.
    • Marked as answer by Jeff0803 Wednesday, March 11, 2020 11:59 PM
    Wednesday, March 4, 2020 4:43 AM
  • Hi Jeff0803,

    Thank you for posting here.

    This is not allowed in CLR.

    You can create two ClassLibrary projects and then reference the first one in the second project, but we cannot reference the exe anyway.

    Best Regards,

    Timon


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    • Marked as answer by Jeff0803 Thursday, March 12, 2020 12:00 AM
    Wednesday, March 4, 2020 7:03 AM