I am getting the following error while trying to import module in PowerShell Core 7.1.0:
PS C:\Users\user> Import-Module -Name PinnedItem
Add-Type: C:\Users\user\Documents\PowerShell\Modules\PinnedItem\0.2.0.0\PinnedItem.psm1:39
Line |
39 | "@ -Language CSharpVersion3
| ~~~~~~~~~~~~~~
| Cannot bind parameter 'Language'. Cannot convert value "CSharpVersion3" to type
| "Microsoft.PowerShell.Commands.Language". Error: "Unable to match the identifier name CSharpVersion3
| to a valid enumerator name. Specify one of the following enumerator names and try again: CSharp"
Was running into the same problem. I submitted PR to handle that part as it works changing to just "@ -Language CSharp on my windows 10 workstation with .Net 4.5
I am getting the following error while trying to import module in PowerShell Core 7.1.0: