That you’ll need:
Visual Studio Community, Pro or Enterprise 2017 or 2019
PowerShell v5+
.NET 4.7.2
.NET 4.6.2 (or later) Developer Pack (only required for packaging)
.NET Core 1.0 or later (only required for packaging)
I’d make sure you have these installed and reboot if you havent already.
You are right it does not seem to affect the function of PoshTools - I notice too that when you open the WYSIWYG designer the actual error disappears completely.
Using it a little more it does appear to affect functionality - I design my form but when I go to code-behind, write some code and switch back to designer I get ‘Could not find type System.Drawing.Point’ - if I choose to ignore this error then it resets the layout of my form completely.
Open Solution Explorer
Expand your PowerShell Form Project
Right click on References and Click Add Reference
Navigate to the .NET Tab
Select System.Drawing from the list and click Add.
Close the form designer and reopen the form designer.
Only problem is you have to keep doing that each time you load the project.
Also seems to affect WPF too.
On a side note, I’m trying to use PSScriptPad with VSCode and WPF but I can’t seem to move any controls I place on the form, they stay in the Center - shall I raise a new topic for this?
I am also seeing this issue. I am trying to update my packages to 5.0 and I have the patch installed (2021.11.1). I try to add references for 5 but it tries to revert to 4.8 and adds those references back in to the solution. Tried with a brand new project, just added the 5.0 references, save and close, reopen and the other 4.8 references appear. Will projects only go to 4.8?
I’m getting many reports of the .NET 5.0 packaging not working so I think there is a bug with that. It doesn’t actually use the assembly references when packaging. I hope to have a fix for the .NET 5.0 packaging this week sometime.