Author Topic: VS 2022  (Read 679 times)

ScottyP

  • Newbie
  • *
  • Posts: 15
    • View Profile
VS 2022
« on: March 09, 2023, 05:58:56 AM »
Hi all, when I copy my project over to another (new) computer with VS 2022 on it instead of VS 2019, I can open the default AHMI project SLN but when I open my one (with created HMI) it has a blank toolbox and complains there are lots of components missing which are referenced in my main form. This is true, since the toolbox is empty but no idea why?

If I open my project in VS 2019, all works as expected, so why can VS 2022 not open my project copy with a working toolbox but yet can open the default SLN from the AHMI zip and the toolbox populates as expected?

toolbox > reset does not work.

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5267
    • View Profile
    • AdvancedHMI
Re: VS 2022
« Reply #1 on: March 09, 2023, 09:09:12 AM »
When you Rebuild Solution what errors do you get? Try rebuilding each project individually

ScottyP

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: VS 2022
« Reply #2 on: March 14, 2023, 09:46:17 AM »
Hi Archie, there is no option to rebuild solution (not in the menu) when I open this project, yet on vs2019 it opens without errors. I am going to try and copy the project over again, it is weird behaviour. I expect I can just lift the project folder from My Documents and place on the new PC with nothing else needed?

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5267
    • View Profile
    • AdvancedHMI
Re: VS 2022
« Reply #3 on: March 14, 2023, 09:53:46 AM »
I expect I can just lift the project folder from My Documents and place on the new PC with nothing else needed?
As long as you get the complete solution with all of the project folders.

ScottyP

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: VS 2022
« Reply #4 on: March 14, 2023, 10:23:23 AM »
Ok, so more info on copying it over again, I am asked to retarget to .NET framework 4.8 - will this work?

I am trying again, having just rebuilt all, and then rebuilt individual project sections but I get an error that "this solution does not support individual rebuild etc" on some sections.

Still the toolbox is completely empty, "show all" shows all standard controls from Windows in grey, but no AHMI controls at all. No errors on rebuild all, including advancedHMIControls.

ScottyP

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: VS 2022
« Reply #5 on: March 14, 2023, 10:43:30 AM »
So to fix any potential errors I had pushed my project to Github, then opened it on the new computer with VS2022 and the same thing happens, it builds fine with no errors but the toolbox is completely empty - any idea what to do Archie ?

It does insist on retargeting to .NET 4.8 and will not accept any other option as 4.0 is deprecated.

"There are no usable controls in this group, Drag an item onto this text to add it to the toolbox"
« Last Edit: March 14, 2023, 10:47:25 AM by ScottyP »

Archie

  • Administrator
  • Hero Member
  • *****
  • Posts: 5267
    • View Profile
    • AdvancedHMI
Re: VS 2022
« Reply #6 on: March 14, 2023, 10:53:10 AM »
See the second post of this topic to see if this is possibly the issue

https://www.advancedhmi.com/forum/index.php?topic=414.msg1458#msg1458

ScottyP

  • Newbie
  • *
  • Posts: 15
    • View Profile
Re: VS 2022
« Reply #7 on: March 14, 2023, 11:48:24 AM »
Thanks Archie, oddly that setting was on, but after some (many) minutes of the project being open, the toolbox eventually populated - I have now pushed the lot up to Github and hopefully it will remain working.

I must admit VS2019 was a bit more user friendly, where 2022 isn't so much. Ah well, progress is progress eh.