Simply - you can't. GUI controls are strictly bound to Windows operating system. So you just can't use these dlls as they use Windows specific apis.
How to use treeview and treenode classes in .Net core console application
Hi,
I have an .Net core console application for linux platform.
How to create treeview in .Net Core console application dynamically.
I need this for one of my requirement.
I know treeview and treenode used to show in GUI, But in my console project these two classes needed
I used below lines for adding windows forms,
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
. . .
<UseWindowsForms>true</UseWindowsForms>
<DisableWinExeOutputInference>true</DisableWinExeOutputInference>
</PropertyGroup>
</Project>
When i do publish, it is giving below error
Error:
There was no runtime pack for Microsoft.WindowsDesktop.App.WindowsForms available for the specified RuntimeIdentifier 'linux-x64'