The Script Task within my SSIS package defaults to .NET Framework v4.5. I'm trying to use v4.5.2 in order to use the newer version of MySQL.Data from NuGet. I go into the Script Task properties and change the framework from v4.5 to v4.5.2, add the MySQL.Data NuGet package, and then save all changes. If I then close the script editor and return to the package designer, and then re-open the script, the .NET Framework for the script reverts back to v4.5 and the references to the MySQL.Data packages are lost. This is occurring in VS2017 on Windows 10.
What is causing the script files to be regenerated each time? How do I disable this from happening?
On a side note, if I attempt to test the package I get a random error saying UnsafeInvokeInternal. I can't determine why this is happening as the script is only attempting to open and close a connection to the MySQL database.