
I am writing a plugin to get a certificate from Azure KeyVault. While following the microsoft quickstart documentation we are getting these errors, depending on which reference I load (I switched after getting this error so many times):
Could not load file or assembly 'Azure.Security.KeyVault.Certificates, Version=4.2.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified
and
Could not load file or assembly 'Azure.Security.KeyVault.Secrets, Version=4.2.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference.
Visual Studio 2019 professional
.Net 4.7.1
Have attempted this as suggested on other sites:
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
<GenerateBindingRedirectsOutputType>true</GenerateBindingRedirectsOutputType>
Here is the folder for reference as well.
Hi,
for plugins I normally suggest to use 4.6.2 (an higher version should work but better to make it 4.6.2)
if you are online means the plugin is sandboxed, so not all DLLs are available, especially the one outside the standard .NET Framework
you have two ways:
1) try to ILMerge this DLL (not suggested as the DLL you are merging may cause the plugin to don't work at all, but may work in the end)
2) move the logic to an external custom webservice and call this webservice inside your plugin
3) check if the calls to Azure Key Vault can be done by standard http calls without using the DLL
hope it helps