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

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: VS Does it again!
« Reply #15 on: August 01, 2019, 02:14:28 PM »
I checked the 2nd download link and it looks like only the files in the AdvancedHMI directory are there. You will need to zip the complete solution that consists of 4 directories and the .sln file.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #16 on: August 01, 2019, 04:25:52 PM »
It has done it again!!!!!!!!!! This is a link to a much smailler project.

https://drive.google.com/file/d/1bs1KEBGcJT6Z_D4ulPwHfSv8Ed0BK1cz/view?usp=sharing

It is two forms, only one is being used. It does not find the AdvancedHMIControls.MeterCompact. I have six of them on the form. I can click ignore and continue and the project will work! It is the same problem with the larger program it has lost devices and the toolbox.[move][/move]

Dave

Phrog30

  • Guest
Re: VS Does it again!
« Reply #17 on: August 01, 2019, 04:31:55 PM »
Do you have virus scanner running? If so, try turning it off. Also check history to see if it blocked or quarantined files.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #18 on: August 01, 2019, 04:53:20 PM »
It happened again!!!!!
The following is a link to a much smaller program.
https://drive.google.com/file/d/1bs1KEBGcJT6Z_D4ulPwHfSv8Ed0BK1cz/view?usp=sharing

It is two forms even though only one is being used. It has lost the tool out of the tool box (MeterCompact) and that generates an alarm. I have tried erasing bin and obj in the three folders as per the discussion on the forum I have the setting correct on load form. I have rebooted. Same Same Same. It is losing the tools. In this example the tools are still in the toolbox. in the other program they are not

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: VS Does it again!
« Reply #19 on: August 01, 2019, 04:56:52 PM »
When you first open Visual Studio, are any of the files already open or do you have to go to Solution Explorer and double click a file to see anything?

I tried your download again and what I get is in the attached picture.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #20 on: August 01, 2019, 05:11:52 PM »
Archie;

I have to go to the solution explore.

This is the link for the last file.
https://drive.google.com/file/d/1mayDkloNQ6dVAlKcbKPOQHuIjreRS3db/view?usp=sharing

This is the link for the 2nd to last file
https://drive.google.com/file/d/13loqGHaDcVRBA4A-T-A7qILs1k9XtWY5/view?usp=sharing

These have everything

Dave

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #21 on: August 01, 2019, 05:28:03 PM »
The following is a much smaller program and it only uses two tools however, they are both missing and that causes an error.

https://drive.google.com/file/d/1KauzjQ9jkOaFCpyk34pt18uGhDiNM7bp/view?usp=sharing

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: VS Does it again!
« Reply #22 on: August 01, 2019, 05:28:37 PM »
Try this solution:

https://drive.google.com/file/d/1-ruF3zFvyW7KB4vezB8S-a5MnWEN7KyG/view?usp=sharing

After you open, be sure the very first thing you do is Build->Rebuild Solution. Otherwise if you open a form first you will get all the errors.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #23 on: August 01, 2019, 06:22:12 PM »
Archie;

The build rebuild worked for the small new program I have written. It also worked for the other program I was finished with. But, the one you sent back must have been the 2nd to last, or it is missing forms. The last program is the one I really need, and I can see the forms in the solution explorer. I tried the build rebuild on it and I still get an error Count is not a member of string. This error is caused because things are missing from the toolbox. For example form change button. If I do not load this program they are there. Once I load the program its like it erases the tools and that causes alarms.

Dave

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: VS Does it again!
« Reply #24 on: August 01, 2019, 06:37:51 PM »
The error with "Count" is fixed by going to each error and changing it to "Length". Once they are all fixed everything should be back working again.

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #25 on: August 01, 2019, 07:47:23 PM »
You are the KING!
It worked!

Thanks,
Archie

Phrog30

  • Guest
Re: VS Does it again!
« Reply #26 on: August 01, 2019, 08:55:25 PM »
The error with "Count" is fixed by going to each error and changing it to "Length". Once they are all fixed everything should be back working again.
So I'm confused, how was this cause by Visual Studio?

ddddd13

  • Full Member
  • ***
  • Posts: 118
    • View Profile
Re: VS Does it again!
« Reply #27 on: August 01, 2019, 09:05:58 PM »
The real solution was build, then rebuild. That seemed to reload the toolbox. 

Count was in a routine Archie created. Maybe he can answer.

Thanks for your help,
Dave

Phrog30

  • Guest
Re: VS Does it again!
« Reply #28 on: August 01, 2019, 09:18:45 PM »
Kind of rhetorical. You made it seem like it was all visual studios fault. Looks like the guy behind the wheel. 😁

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5322
    • View Profile
    • AdvancedHMI
Re: VS Does it again!
« Reply #29 on: August 01, 2019, 09:21:48 PM »
The error with "Count" is fixed by going to each error and changing it to "Length". Once they are all fixed everything should be back working again.
So I'm confused, how was this cause by Visual Studio?
There were 2 classes in the AdvancedHMIControls project with errors, therefore it could not build the project. Without a successful build on AdvancedHMIControls, none of the controls exist, therefore VS couldn't display the form that had controls on it.

The errors were my fault because I created those classes in .NET 4.7 and used the Count method to get the number of array elements. When the controls were imported into AdvancedHMI, they were then compiled against .NET 4.0 which does not support the Count method for arrays.
« Last Edit: August 01, 2019, 09:29:28 PM by Archie »