Azure / Azure/azure-powershell

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

Open
#27,708 4 comments 0 reactions 0 assignees View on GitHub
bug Tracking
Dominant language
C#
Stars
4.8k
Forks
4.3k
Avg merge
3d 14h
Merged PRs (30d)
54

Description

### 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](https://github.com/wastoresh/azure-powershell/tree/stg98)
```




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

### Issue script & Debug output

```PowerShell
$ctx = New-AzStorageContext -StorageAccountName $storageAccount
Get-AzStorageContainer -Context $ctx -MaxCount 10
Get-AzStorageContainer : Method not found: 'Void Azure.Core.RequestUriBuilder.AppendQuery(System.ReadOnlySpan`1, System.ReadOnlySpan`1, 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

```PowerShell
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

```PowerShell
coming module Az.Storage
```

### Error output

```PowerShell

```

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure in PowerShell 5 with Get-AzStorageContainer and compare the Azure.Storage.Blobs, Files.DataLake, Files.Shares, and Queues package references shown in the issue. Start from the dependency change in the linked stg98 branch; done means the storage cmdlet runs without the Azure.Core RequestUriBuilder MissingMethodException.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp, powershell
Domain
cli, cloud, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.