PowerShell / PowerShellStandard

MIT License
158 stars 24 forks source link

Issues when building modules against PowerShell.Standard.Library 5.1 Preview.1 #3

Closed powercode closed 6 years ago

powercode commented 6 years ago

Attributes that users params in constructors no longer work.

[ValidateSet("pending", "submitted", "shelved")] must be written as [ValidateSet(new[]{"pending", "submitted", "shelved"})]

Same with OutputType, Alias etc.

PSMemberInfoCollection<PSPropertyInfo> no longer has an indexer with a string parameter.

so

PSMemberInfoCollection<PSPropertyInfo>properties;
properties["name"];

will now result in Argument1: cannot convert from 'string' to 'int'

JamesWTruher commented 6 years ago

the ValidateSet issue was somewhat general, my tools eliminated the params modifier. I'll have that fixed shortly

JamesWTruher commented 6 years ago

fixed in https://github.com/PowerShell/PowerShellStandard/pull/9

powercode commented 6 years ago

Can you publish a preview-02?

JamesWTruher commented 6 years ago

yep, that's the plan - should be tomorrow