Update Azure.Identity and Azure.Core#18083
Conversation
There was a problem hiding this comment.
The following cmdlet will fail in Powershell 7.2.2 with this PR:
New-AzStorageTable -Name newtable -Context $ctx
It looks "Azure.Data.Tables 12.2.0" can't be load with this PR.
The error is:
Message : Method not found: 'Void Azure.Data.Tables.TableServiceClient..ctor(System.Uri,
Azure.Core.TokenCredential, Azure.Data.Tables.TableClientOptions)'.
TargetSite : Void .ctor(Microsoft.WindowsAzure.Commands.Storage.AzureStorageContext)
Data : {}
InnerException :
HelpLink :
Source : Microsoft.Azure.PowerShell.Cmdlets.Storage
HResult : -2146233069
StackTrace : at Microsoft.WindowsAzure.Commands.Storage.Model.Contract.StorageTableManagement..ctor(AzureStor
ageContext context)
at Microsoft.WindowsAzure.Commands.Storage.Table.StorageCloudTableCmdletBase.CreateChannel() in
D:\code\PSH_Dev\src\Storage\Storage\Table\StorageCloudTableCmdletBase.cs:line 55
at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.InitChannelCurrentSub
scription(Boolean force) in
D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 340
at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.InitChannelCurrentSub
scription() in D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 101
at Microsoft.WindowsAzure.Commands.Storage.Common.StorageCloudCmdletBase`1.ProcessRecord() in
D:\code\PSH_Dev\src\Storage\Storage\Common\StorageCloudCmdletBase.cs:line 125
at System.Management.Automation.CommandProcessor.ProcessRecord()
Besides that, on PSH 7.2.2, it looks 2 version of Azure.core will be loaded, not sure if related. (Azure.Data.Tables 12.2.0 just depends on >= Azure.Core 1.19.0) :
PS C:\temp> [appdomain]::currentdomain.getassemblies() | Where-Object {$_.location -like "*Azure.core*"} | ft location,fullname
Location FullName
-------- --------
D:\code\PSH_Dev\artifacts\Debug\Az.Accounts\NetCoreAssemblies\Azure.Core.dll Azure.Core, Version=1.19.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
D:\code\PSH_Dev\artifacts\Debug\Az.Accounts\StartupScripts\..\AzSharedAlcAssemblies\Azure.Core.dll Azure.Core, Version=1.24.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8
PS 7.2.2 and 7.2.3 both work well. I believe it is related to your environment (may be due to unclean development environment) You can try below engineering build. |
Description
Upgrade Azure.Identity to 1.6.0 and Azure.Core to 1.24.0
Checklist
CONTRIBUTING.mdChangeLog.mdfile(s) has been updated:ChangeLog.mdfile can be found atsrc/{{SERVICE}}/{{SERVICE}}/ChangeLog.md## Upcoming Releaseheader -- no new version header should be added