https://learn.microsoft.com/en-us/answers/questions/ask/
I am trying to execute the following lines of code in a codeactivity to be used in powerapps:
//
using Azure.Core;
using Azure.Identity;
using Azure.Security.KeyVault.Secrets;
var client = new SecretClient(new Uri(KEY_VAULT_URI), new DefaultAzureCredential());
var secret = client.GetSecret(SECRET_NAME);
CLIENT_SECRET = secret.Value.Value;
//
The codactivity is in a workflow set to on-demand and invoked using javascript by sending a REST endpoint via HTTP to the current environment. Complete reinstallation has been attempted with the project source and libraries. Binding redirects and manually editing the csproj file with broader terms for the DLL item group references were also used without much sucesss. The target framework is 4.7.1 and the libraries being used for vault access are currently as follows:
\bin\Debug\Azure.Core 1.3800
\bin\Debug\Azure.Identity 1.1100
\bin\Debug\Azure.Security.KeyVault.Secrets 4.600
\bin\Debug\Azure.Core.Experimental 0.1.0.0
Trace log:
Message: Could not load file or assembly 'Azure.Security.KeyVault.Secrets, Version=4.6.0.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The located assembly's manifest definition does not match the assembly reference. (Exception from HRESULT: 0x80131040)