Author Topic: Any issues changing from .net framework 4 to .net framework 4.5.2  (Read 317 times)

boardmaker

  • Newbie
  • *
  • Posts: 13
    • View Profile
Hey guys.  I've been stumbling through trying to get AdvancedHMI to connect with a MySQL database. 
My first problem was I couldn't add reference mysql.data.  It wasn't there.  However, if I opened a windows form app in Visual Studio 2019, it was available.  I tried to manually add the reference by browsing to it's location. 
C:ProgramFiles(x86)\mysql\mysqlconnectornet 8.0.27\assemblies\v4.5.2\mysql.data.dll

That seemed to work.

However, when I would build my solution I received the error that mysqlconnection is not defined.  After some googling, I found that the connector needs to be at the same level or lower than .net.
My project was originally created in the target .net framework 4.  I changed it to .net framework 4.5.2.

After building the project, I was met with a multitude of errors. 
windows form timer is not defined bc30002

Pretty much every component with windows.forms.timer was an error.
Google said it should be System.windows.forms.timer

I changed all of them and don't seem to have any errors now.
Plus, my database is connecting successfully.

Are there any downsides to what I have done?
Everything seems to be working.  I'll admit that I was very hesitant to make so many changes when I barely have a clue what I'm doing. :o

Obviously, I'm new at this.  I've been self teaching vb.net and mysql.  I'm sure I will have a thousand more questions before this is over.

My goal is to build a HMI connected to a DoMore PLC that controls a dry kiln.  I typically use a CMore as the interface, but with it's crappy datalogging I've decided to do it in AdvancedHMI.  I want to log to a mysql database and be able to print historical line graphs when necessary.  The HMI part has went well, but now I'm to datalogging.  I've been trying to learn through youtube.  I'll take any advice you're willing to give.