Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Az.Accounts cannot be imported into the latest PowerShell Core 6.x #17428

Closed
dingmeng-xue opened this issue Mar 10, 2022 · 2 comments
Closed
Labels
Accounts Issues in Az.Accounts except authentication related feature-request This issue requires a new behavior in the product in order be resolved.

Comments

@dingmeng-xue
Copy link
Member

Description

Az.Accounts 2.7.3 cannot be imported into PowerShell Core 6.2.7

Issue script & Debug output

PS C:\Dev\PowerShell-6.2.7-win-x64 >  import-module az.accounts
WARNING: This version of Az.Accounts is only supported on Windows PowerShell 5.1 and PowerShell 7.0.6 or greater, open https://aka.ms/install-powershell to learn how to upgrade. For further information, go to https://aka.ms/azpslifecycle.
WARNING: Unable to find type [Microsoft.Azure.PowerShell.AuthenticationAssemblyLoadContext.AzAssemblyLoadContextInitializer].
Import-Module : Could not load file or assembly 'Azure.Identity, Version=1.5.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8'. The system cannot find the file specified.
At C:\Users\dixue\Documents\PowerShell\Modules\az.accounts\2.7.3\Az.Accounts.psm1:117 char:1
+ Import-Module (Join-Path -Path $PSScriptRoot -ChildPath Microsoft.Azu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [Import-Module], FileNotFoundException
+ FullyQualifiedErrorId : System.IO.FileNotFoundException,Microsoft.PowerShell.Commands.ImportModuleCommand

Environment data

Name                           Value
----                           -----
PSVersion                      6.2.7
PSEdition                      Core
GitCommitId                    6.2.7
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Module versions

Script     2.7.3      az.accounts

Error output

No response

@dingmeng-xue dingmeng-xue added bug This issue requires a change to an existing behavior in the product in order to be resolved. needs-triage This is a new issue that needs to be triaged to the appropriate team. labels Mar 10, 2022
@ghost ghost removed the needs-triage This is a new issue that needs to be triaged to the appropriate team. label Mar 10, 2022
@dingmeng-xue
Copy link
Member Author

dingmeng-xue commented Mar 10, 2022

The fix is just a temporarily solution because

dotnetapp2.1 was end of support https://devblogs.microsoft.com/dotnet/net-core-2-1-will-reach-end-of-support-on-august-21-2021/
correspondingly PowerShell Core was end of support https://docs.microsoft.com/en-us/powershell/scripting/install/powershell-support-lifecycle?view=powershell-7.2
Azure PowerShell announced the same in the last year. https://docs.microsoft.com/en-us/powershell/azure/what-is-azure-powershell?view=azps-7.3.0#the-az-powershell-module

Please update script and PowerShell version as soon as possible.

@dingmeng-xue dingmeng-xue added the Accounts Issues in Az.Accounts except authentication related label Mar 12, 2022
@dingmeng-xue
Copy link
Member Author

Closed it as Az.Accounts 2.7.4 is published.

@dingmeng-xue dingmeng-xue added feature-request This issue requires a new behavior in the product in order be resolved. and removed bug This issue requires a change to an existing behavior in the product in order to be resolved. labels Mar 12, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Accounts Issues in Az.Accounts except authentication related feature-request This issue requires a new behavior in the product in order be resolved.
Projects
None yet
Development

No branches or pull requests

1 participant