SQLServerPSModule
SQLServerPSModule copied to clipboard
Could not load file or assembly 'Azure.Security.KeyVault.Keys, Version=4.4.0.0'
Issue Description
We are getting this kind of exceptions ""Could not load file or assembly 'Azure.Security.KeyVault.Keys, Version=4.4.0.0, Culture=neutral, PublicKeyToken=927421***e12e44c8'. Could not find or load a specific file. (0x80131621)" while executing the command "Invoke-Sqlcmd -ConnectionString $connectionString -InputFile $sqlScriptPath"
This issue is happening after the latest version upgrade from version 22.2.0 to 22.3.0
Workaround
As a workaround it was performed the downgrade of the version from 22.3.0 to 22.2.0 everything started to work, the command used was Install-PSResource SqlServer -Version 22.2.0 -TrustRepository -Scope CurrentUser
This was also reported and suggested on here https://github.com/actions/runner-images/issues/10216 and in different issues on this repository.
Additionally
Current library found while installing/importing SqlServer module was this "C:\Modules\az_11.3.1\Az.KeyVault*5.2.0*\Azure.Security.KeyVault.Keys.dll" so it isn't clear about this library version on the exception Version=4.4.0.0
Would you please help to take a look on this?
I'm seeing the same issue here now.
So are we
The lack of attention on issues like this is frustrating. For what it's worth, I upgraded the Az module to 13 and the issue appeared to go away. The version of Az.KeyVault it installed is 6.3.1
@sejagada, could you confirm this is fixed in the upcoming v22.4?
This was fixed in 22.4.5.1