Hello
I am developing a GUI with Powershell on Ubuntu (via Virtual Box) but I am not able to use System.Windows.Forms:
I installed Mono-devel,
I searched apt-file search System.Windows.Forms.dll retrieving 12 different version,
I copied the dll version 4.8 in the script directory,
I run the command Add-Type -AssemblyName System.Windows.Forms
The version 4.8 tells
Add-Type: Could not load file or assembly 'System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089'. Reference assemblies cannot be loaded for execution. (0x80131058)
The previous ones tells:
Add-Type could not load file or assembly ‘<Unknown>’ Index not found. (0x80131124)
I’m not a fan of PowerShell GUIs so I never felt the urge to create one so I actually don’t have experiences on this particular topic. But I wouldn’t expect a Windows exclusive library like System.Windows.Forms.dll to work on Linux ever.
PowerShell core (version 6 and up) is based on dotNet core what does not have Windows dlls.