Could not load file or assembly 'BouncyCastle.Crypto
Closed this issue · 2 comments
Hi, can you be helpful with error message ?
OUTPUT: New-Object: D:\home\site\wwwroot\Modules\PowerCommander\AuthCommands.ps1:359
OUTPUT: Line |
OUTPUT: 359 | …
OUTPUT: | Exception calling ".ctor" with "2" argument(s): "Could not load file or assembly 'BouncyCastle.Crypto, Version=1.9.0.0, Culture=neutral, PublicKeyToken=0e99375e54769942'. Could not find or load a specific file. (0x80131621)"
Some Function Apps run fine, and some don't. We are having trouble spotting the differences.
This error is returned when KeeperSdk cannot load BouncyCastle.Crypto encryption library. KeeperSdk references version 1.9.0
Probably there is another Powershell module that uses BouncyCastle.Crypto library with version less than 1.9.0
When this older library is loaded by Pwershell process KeeperSdk fails to load newer version.
Do you have Keeper SecretsManager module installed?
The latest version of SecretManagement.Keeper 16.3.3 fixes this issue.
To fix this issue the BouncyCastle.Crypto.dll in PowerCommander module should be replaced with the library from the other module.
Thanks for the help. That did the trick.
It was an older version of that file in Az.Keyvault module.