Make certain you know what PowerShell you are running before doing so.
Specifically, if you are looking to test a .NET v4.x assembly, you must being running Windows PowerShell [v5.1], otherwise known as the "Desktop" edition of PowerShell, with "powershell.exe" as the executable. This one is based on .NET Framework.
If you execute "pwsh.exe", you are running PowerShell v6.x/v7.x, which is based on .NET Core, with .NET v5.x being the next release of .NET Core following v3.x. This edition of PowerShell is also known as the "Core" edition, and cannot use .NET Framework assemblies.