Grasshopper Plugin Windows.Forms breaks the assembly

Hey folks,

I recently jumped back into building plugins with R8 to experiment with different UIs.
One issue that I found was upon checking Windows UI options in the ‘new grasshopper add on’ menu.
If Windows.Forms is included, the compiler throws a Windows compatibility error NETSDK1.
Can anyone replicate this?
I’m using VS 2022 targeting net7.0 and net48 using GH version 8.0.23164.14305-wip in C#.

-Andrei

Ok I seemed to have resolved the issue.

in your .csproj file change the following line:

<TargetFrameworks>net7.0-windows;net48-windows</TargetFrameworks>

In grasshopper developer setting, redirect compiling directory to the new folder.

To be able to add System.Windows.Forms without the compiler wigging out, in the same file add the line

<UseWindowsForms>true</UseWindowsForms>