Multiple Project Solution

I would like to take multiple Projects developed by Different members of my team and combine them into one solution. I would also like to use One form to access the different parts of the system. For Example....

Use frmMain located in MainRun Project to bring up frmCatalog located in Catalog Project.

Both Projects are members of the same soultion and both Projects were written in VB.NET. How would I code a Button_Click event to bring up frmCatalog




Answer this question

Multiple Project Solution

  • jyothsna

    Yes, in Visual Studio to add a reference to one project the project must compile to a DLL (library), not an EXE (application). Are both projects for EXEs .NET can reference executables but VS does not allow this to help avoid circular dependencies.

  • music_at_ulan

    Hi,

    I really need your help on this. I am thinking to use the same way in my solution.

    I have the main module and need to access the other modules(exe).

    Can you show me how


  • Queen of the desert

    Yes Both files are assembled as EXE's. How would I change one to compile into a DLL

  • Lucianamaría

    My solutions currnet situation:

    #######

    project A

    login form

    Main form (which get data from public variables declaredd in login form)

    Project B

    login form

    Main form (which get data from public variables declaredd in login form)

    #######

    And the solution I wish should be like:

    #######

    Project C

    login form (will have buttons to launch Main forms of project A and B)

    Project A

    Main form

    Project B

    Main form

    #######

    Here again the main forms of A and B will be accessing variables declared in login form of proejct C.

    How do I get this thing done.

    Thanks.



  • ButlerDJ

    Hi Kalor,

    Let us call your projects Project A and ProjectB for convenience. Now a circular dependency is a situation where ProjectA is using types(classes and methods) in ProjectB and ProjectB is using types in ProjectA.

    When you define multiple projects you should have one of the projects as the main project and the other project would be a dependency for the main project. This means you need to design it in such a way that ProjectA consumes classes and methods in ProjectB but ProjectB does not require anything in ProjectA.

    If in fact there are common elements which both projects need, then create a third project called ProjectC and reference it in both ProjectA as well as ProjectB. This would be a solution to resolve the circular dependency problem.

    Hope this Helps,
    Vikram



  • jimmmmmmmmmmmmmmmmmmmmmmmmmm

    If I understand what you're asking, it's not hard to achieve. The project containing frmMain needs to add a reference to the project containing frmCatalogue, and of course use (import) the namespace.

    Add a handler to the appropriate Click event that, when called, instantiates then shows a frmCatalogue object.

    Regards,

    Tim Haughton

    Agitek Ltd
    http://agitek.co.uk

  • oliverjo

    I hate to be a pain here but This is the first time I have ever worked with more than one project in a solution. I understand the general idea of what you said but don't know how to do it.

    I assume the code for the Click event is the standard
    Dim 'variable' as new frmCatalog
    variable.showdialog()

    But how would I put a reference to the other project When I right click on project I saw the option to add a reference. If I select this and then go to the tab on top for projects and select the project containing frmCatalog it says the assembly must be in the form of a DLL. If this is the correct way to create the reference then how do I make the assembly a DLL

    Thanks for any help you can provide



  • tcheck

    Thank's Everyone for the help! I was able to get this done and working properly.

  • Mr. Bungle

    Ok, I was able to save the one project as a DLL and the MainProject is still an executable. However as you mentioned, When I tried to add the DLL to the EXE project it came up with "Operation not allowed because this would cause a Circular Dependancy". Is this because both projects are in the same Solution

  • Multiple Project Solution