Author Topic: Merging solutions  (Read 816 times)

Jose

  • Newbie
  • *
  • Posts: 5
    • View Profile
Merging solutions
« on: January 17, 2019, 01:09:40 PM »
This might be a silly question, but I have developed 2 different screens on 2 different instances of Advanced HMI and would like to somehow merge them to limit the need to rebuild them in the "master" project.
I was hoping a simple copy/paste of the "mainform.vb" class would do it, but that doesn't work.
I tried adding from existing as was suggested on an older post, but this does not import the [Design] part of it.

I know this is a noob issue, but I don't want to reinvent the wheel if there's a simple way of doing this.


Thanks in advance!

ha... I just realized I said advance ;)

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5317
    • View Profile
    • AdvancedHMI
Re: Merging solutions
« Reply #1 on: January 17, 2019, 01:18:23 PM »
I'm guessing both of your forms used the MainForm, therefore they have the same name. In that case the first thing you need to do is rename one of them by right clicking it in Solution Explorer and choose rename. It should ask you about renaming all instances, be sure to select Yes.

Now you can open the second solution and in Solution Explorer Right click the AdvancedHMI project and select Add->Existing Item. The browse to and choose the form in the other project that you renamed. ONLY select the .vb file. VS will automatically grab the designeer and resx files.


Jose

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Merging solutions
« Reply #2 on: January 17, 2019, 02:13:42 PM »
Thanks Archie!
This worked.

My issue wasn't renaming it, as I figured this was a problem so I had already tried that route.  My issue was that I manually selected all 3 files instead of just the VS file. 
I guess Visual Studio is much smarted than me;)