iricigor / PS-azmi

☁️🕵️‍♂️ PowerShell module for using Azure Managed Identity within your script
MIT License
1 stars 0 forks source link

Windows PowerShell incompatibility #30

Open iricigor opened 3 years ago

iricigor commented 3 years ago
PS C:\Users\Igor> Import-Module azmi
Import-Module : Could not load file or assembly 'System.Management.Automation, Version=7.0.3.0, Culture=neutral,
PublicKeyToken=31bf3856ad364e35' or one of its dependencies. Strong name validation failed. (Exception from HRESULT:
0x8013141A)
iricigor commented 3 years ago

Hints lookout.net, stackoverflow.com, stackoverflow.com, MS Docs

iricigor commented 3 years ago

Integration pipeline extended to also include basic Windows PowerShell agent testing. The error can be seen here.

iricigor commented 3 years ago

This explains it - at MS Docs - or not...

iricigor commented 3 years ago

Here are instructions... https://github.com/PowerShell/PowerShell/blob/master/docs/cmdlet-example/visual-studio-simple-example.md

iricigor commented 3 years ago

Spent two weeks on that and decision is to give up for now from support for Windows PowerShell. Even larger Azure modules have that complicated, using two separate sets of dlls. For example Az.Accounts module is pre-importing different dlls for Windows PowerShell (directory PreloadAssemblies) and for PowerShell core (directory NetCoreAssemblies)

iricigor commented 3 years ago

Moving task to later and tagging with help needed