I'm trying to create a basic PowerShell Module with a binary Cmdlet internals, cause writing things in PowerShell only doesn't look as convenient as in C#.
Following this guide, it looks like I have to:
- add Microsoft.PowerShell.SDK to my
project.json
- mark my cmdlet class with required attributes
- write manifest file, with
RootModule
, targeting my.dll
- put that
.dll
nearby manifest - put both under
PSModulePath
but, when I'm trying to Import-Module
, PowerShell core complains on missing runtime:
Import-Module : Could not load file or assembly 'System.Runtime, Version=4.1.0.0,
Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system
cannot find the file specified.
At line:1 char:1
Am I doing something wrong, or such tricky things are not supported yet as well?