Author Topic: VS Does it again!  (Read 3423 times)

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
VS Does it again!
« on: July 31, 2019, 02:01:57 PM »
Archie;

VS has done it to me again. I have saved 4 or 5 copies of this program but it names it, as it likes, and it causes it to write a bad program into all of them!!!

When I try to open the main form I get an alarm "cannot process the alarm at line 35:MeBasicLabel=New AdvancedHMIControls.BasicLabel() The code within the method 'InitializeComponent is generated by the designer and should not be manually modified.

When trying to open other forms I get more errors. Such as.

Could not find type MFGControl.AdvancedHMI.FormChangeButton. Please make sure that the assembly that contains this type is referenced.

and

The variable FormChangeButton2 is either undeclared or was never assigned.

I have cleaned the project cleaned advanced HMI, closed VS and reopened, still the same alarms.

Why does this keep doing it to me, and how can I save the program under a different name that won't clobber any other program?

Thanks,
Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: VS Does it again!
« Reply #1 on: July 31, 2019, 07:24:15 PM »
First thing you want to do to avoid the VS2019 bug is to go to Tools->Options and removed the check from Project And Solutions->Reopen Documents on Solution Load

The setting is shown in the attached picture.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #2 on: July 31, 2019, 08:22:36 PM »
Archie;

I noticed on the forum this setting. I turned it off still it bombs out.

I downloaded another copy of Advanced HMI copied the files over to the new directory and it still bombs. It does not have a toolbox at all now.

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: VS Does it again!
« Reply #3 on: July 31, 2019, 09:17:33 PM »
Did you get any errors when you built the solution?

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #4 on: July 31, 2019, 10:09:33 PM »
Archie;

Yes. On the main form when I try to go to the design.

The designer can process the code at line 37: MeMessageHandlerPlc1=new advanced HMI controls.MessageHandlerPLC(ME components) the code within the method initialize component is generated by the designer and should not be manually modified. Please remove any changes and try opening the designer again.

The toolbox does not have AdvancedHMI tools in it. I believe that is what causes the problem.

Dave

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #5 on: July 31, 2019, 10:13:59 PM »
Archie;

I have remade the Main Form. There are three forms change buttons going to another form. I have tried to put these three forms in the same directory and have loaded them into the project using (File, Open, File) but the project doesn't recognize the new form. I cannot see the design.
Why?

Dave

Godra

  • Hero Member
  • *****
  • Posts: 1447
    • View Profile
Re: VS Does it again!
« Reply #6 on: July 31, 2019, 11:57:25 PM »
Can you upload your project so we can try it?

I don't recall any other member reporting issues like the ones you are having.
Maybe it's time for you to look into your computer as a possible cause.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #7 on: August 01, 2019, 09:19:25 AM »
Godra;

Where would you like me to upload it?

I have another program (doing something different) that works. However I do not change forms, and that's one of the toolbox items missing.

Thanks,
Dave

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #8 on: August 01, 2019, 10:00:52 AM »
Ok I figured that out the following links are for the last three versions. They should be very similar. The one labeled last is a lot smaller then the other two. I think because I erased the bin and obj files.



THE LAST PROGRAM
https://drive.google.com/file/d/16x8RfcZs_W22-s9EVxIwqi7aKT_Q0357/view?usp=sharing

THE 2ND TO THE LAST PROGRAM
https://drive.google.com/file/d/1YRhohn1JviOyoPspyHbZOaHzAAorFDw-/view?usp=sharing


THE 3RD TO THE LAST PROGRAM
https://drive.google.com/file/d/1sKqCkjlbQNu2CXs2wLIyNR9E6BdwtRgr/view?usp=sharing

Thanks,

Dave

Phrog30

  • Guest
Re: VS Does it again!
« Reply #9 on: August 01, 2019, 10:31:17 AM »
The last program was not complete, you are missing folders/files. Probably why it was smaller.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #10 on: August 01, 2019, 10:35:58 AM »
Phrog30;

On the forum there is a post that talks about erasing the bin and obj files. I tried that and I think that is why it is smaller. When looking at the files in the folder it seems all my forms are there.

Thanks,
Dave

Phrog30

  • Guest
Re: VS Does it again!
« Reply #11 on: August 01, 2019, 10:54:49 AM »
Ok, the download I did, they weren't all there. Good luck.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #12 on: August 01, 2019, 11:11:46 AM »
They weren't all there for all of them?

Dave

Phrog30

  • Guest
Re: VS Does it again!
« Reply #13 on: August 01, 2019, 12:14:09 PM »
I only checked the first one

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #14 on: August 01, 2019, 12:34:42 PM »
I'm dying here. Could you check the second?

Dave