atifaziz / NCrontab

Crontab for .NET
Apache License 2.0
913 stars 139 forks source link

Remove offending lines causing InvalidCastException in WinForms app #89

Closed jdmallen closed 3 years ago

jdmallen commented 3 years ago

Addresses issue #87.

There may be a better solution, but this does seem to allow the window to open with the status bar in .NET 5 without issue.

jdmallen commented 3 years ago

image

jdmallen commented 3 years ago

If MainForm.Designer.cs was simply ported to .NET 5, I think modifying the auto-gen file should be fine for a fix, since I presume the next time it gets auto-generated using the .NET 5 tooling (instead of the old .NET Framework WinForms tooling), it won't stick a line in there that will immediately make it break. Big assumption, but I think it's a reasonably safe one.

atifaziz commented 3 years ago

…since I presume the next time it gets auto-generated using the .NET 5 tooling (instead of the old .NET Framework WinForms tooling), it won't stick a line in there that will immediately make it break.

I think at some point it might be worth to re-create the form with the .NET 5 designer to “upgrade” the designer code.