Skip to content

Upgrade to latest Storage dataplane SDK, storage cmdlet will fail with "method not found" #27708

Open
@blueww

Description

@blueww

Description

I recently upgrade Az.Storage to latest storage dataplane SDK release (Azure.Core still depends on 1.44.1),but most storage cmdlets not work in PSH 5 with following error. (PSH 7 works)

My code change can be found in the last commit in wastoresh/azure-powershell at stg98

    <PackageReference Include="Azure.Storage.Blobs" Version="12.25.0-beta.1" />
    <PackageReference Include="Azure.Storage.Files.DataLake" Version="12.23.0-beta.1" />
    <PackageReference Include="Azure.Storage.Files.Shares" Version="12.23.0-beta.1" />
    <PackageReference Include="Azure.Storage.Queues" Version="12.23.0-beta.1" />

The change is not for 5/19 release, but should be required in the recent future release.

Issue script & Debug output

$ctx = New-AzStorageContext -StorageAccountName $storageAccount
Get-AzStorageContainer -Context $ctx -MaxCount 10
Get-AzStorageContainer : Method not found: 'Void Azure.Core.RequestUriBuilder.AppendQuery(System.ReadOnlySpan`1<Char>, System.ReadOnlySpan`1<Char>, Boolean)'.
At line:2 char:1
+ Get-AzStorageContainer -Context $ctx1 -MaxCount 10
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : CloseError: (:) [Get-AzStorageContainer], MissingMethodException
    + FullyQualifiedErrorId : MissingMethodException,Microsoft.WindowsAzure.Commands.Storage.Blob.Cmdlet.GetAzureStorageContainerCommand

Environment data

Name                           Value                                                                                                                                                                                                         
----                           -----                                                                                                                                                                                                         
PSVersion                      5.1.26100.3624                                                                                                                                                                                                
PSEdition                      Desktop                                                                                                                                                                                                       
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                                                                                                       
BuildVersion                   10.0.26100.3624                                                                                                                                                                                               
CLRVersion                     4.0.30319.42000                                                                                                                                                                                               
WSManStackVersion              3.0                                                                                                                                                                                                           
PSRemotingProtocolVersion      2.3                                                                                                                                                                                                           
SerializationVersion           1.1.0.1

Module versions

coming module Az.Storage

Error output

Metadata

Metadata

Assignees

No one assigned

    Labels

    TrackingWe will track status and follow internallybugThis issue requires a change to an existing behavior in the product in order to be resolved.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions