RhinoCommonPlugin For V7 can not find WinForm

When I create a new solution in visual studio 2019, it is a RhinoCommon Plug-In for Rhino7(C#).

Everything is ok, but I want to add a Window Forms , i can not find “Winform” or “Dialog” item, and Eto.Forms exists.

But when I use RhinoCommon Plug-In for Rhino6 's solution , add a new item ," WInform" or “Dialog” item exist.

why?

Reference System.Windows.Forms library in your project.

We recommend using the Eto.forms library for GUI development. We use it also for the plug-in code we create ourselves (like Rhino Render settings panels).

Thank for your reply, but I have already refreence System.Windows.Forms.

I know that Eto forms library is recommanded. but My ProjectManager wish me use C# Windowns.forms.
And when i use Eto.Forms View, Eto.Forms 's Toolbox is null.

Hi @ddseven_2000,

For non cross-platform projects, try this:

1.) Open your project’s .vcproj file in a text editor
2.) Change Microsoft.NET.Sdk to Microsoft.NET .Sdk.WindowsDesktop at the top
3.) Add <UseWindowsForms>True</UseWindowsForms> and/or <UseWpf>True</UseWpf> to the <PropertyGroup>

Does this help?

– Dale

1 Like

Hi Dale.

Thank for your help. It’s work.

I open the csproj file and add UseWindownsForm=True item in PropertyGroup. Then I open the solutaion again, it’s resolved.

I did not change Microsoft.Net.Sdk to Microsoft.Net.Sdk.WindowDesktop, i think it doesnt’s matter.

Thank for your help agian.

ddseven