navjot3019
New member
- Joined
- Mar 16, 2023
- Messages
- 4
- Programming Experience
- 1-3
Describe the bug:
We are implementing some changes in our Web load test and performance testing project (in Visual Studio) to enable webtests to fetch passwords from an encrypted SQL DB by using master key stored in Azure key vault. For this we have installed below 3 NuGet packages:
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
Microsoft.IdentityModel.Clients.ActiveDirectory
Newtonsoft.Json
During this implementation, we are getting below error:
Error Message:
System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'Azure.Core, Version=1.0.2.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
Source=Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
StackTrace: at Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.AzureSqlKeyCryptographer..ctor(TokenCredential tokenCredential) at Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider..ctor(TokenCredential tokenCredential, String[] trustedEndpoints) at WebAndLoadTestProject1.GetAllCredentialsToExcel.PreWebTest(Object sender, PreWebTestEventArgs e)
Line of code where it throws above error:
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider akv1 = new Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider(new LegacyAuthCallbackTokenCredential());
Fusion log:
Pre-bind state information ===\r\n
LOG: DisplayName = Azure.Core, Version=1.0.2.0, Culture=neutral, PublicKeyToken=92742159e12e44c8\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : Azure.Security.KeyVault.Keys, Version=4.0.3.0, Culture=neutral, PublicKeyToken=92742159e12e44c8.\r\n===\r\nLOG: This bind starts in LoadFrom load context.\r\nWRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().\r\nLOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\QTAgent_40.exe.Config\r\nLOG: Using host configuration file: \r\nLOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.\r\nLOG: Post-policy reference: Azure.Core, Version=1.0.2.0, Culture=neutral, PublicKeyToken=92742159e12e44c8\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/Azure.Core/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Azure.Core/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/Azure.Core/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Azure.Core/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/DataCollectors/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///Q:/WebAndLoadTestProject1/TestResults/Out/Azure.Core.DLL.\r\nWRN: Comparing the assembly name resulted in the mismatch: Minor Version\r\nLOG:
Environment:
Visual Studio version is 16.11.9
Runtime Environment:
OS Name: Windows
OS Version: 2019 Server
We are implementing some changes in our Web load test and performance testing project (in Visual Studio) to enable webtests to fetch passwords from an encrypted SQL DB by using master key stored in Azure key vault. For this we have installed below 3 NuGet packages:
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
Microsoft.IdentityModel.Clients.ActiveDirectory
Newtonsoft.Json
During this implementation, we are getting below error:
Error Message:
System.IO.FileNotFoundException HResult=0x80070002 Message=Could not load file or assembly 'Azure.Core, Version=1.0.2.0, Culture=neutral, PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
Source=Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider
StackTrace: at Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.AzureSqlKeyCryptographer..ctor(TokenCredential tokenCredential) at Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider..ctor(TokenCredential tokenCredential, String[] trustedEndpoints) at WebAndLoadTestProject1.GetAllCredentialsToExcel.PreWebTest(Object sender, PreWebTestEventArgs e)
Line of code where it throws above error:
Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider akv1 = new Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider(new LegacyAuthCallbackTokenCredential());
Fusion log:
Pre-bind state information ===\r\n
LOG: DisplayName = Azure.Core, Version=1.0.2.0, Culture=neutral, PublicKeyToken=92742159e12e44c8\n (Fully-specified)\r\nLOG: Appbase = file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/\r\nLOG: Initial PrivatePath = NULL\r\nCalling assembly : Azure.Security.KeyVault.Keys, Version=4.0.3.0, Culture=neutral, PublicKeyToken=92742159e12e44c8.\r\n===\r\nLOG: This bind starts in LoadFrom load context.\r\nWRN: Native image will not be probed in LoadFrom context. Native image will only be probed in default load context, like with Assembly.Load().\r\nLOG: Using application configuration file: C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\Common7\IDE\QTAgent_40.exe.Config\r\nLOG: Using host configuration file: \r\nLOG: Using machine configuration file from C:\Windows\Microsoft.NET\Framework64\v4.0.30319\config\machine.config.\r\nLOG: Post-policy reference: Azure.Core, Version=1.0.2.0, Culture=neutral, PublicKeyToken=92742159e12e44c8\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/Azure.Core/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/CommonExtensions/Microsoft/TeamFoundation/Team Explorer/Azure.Core/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PrivateAssemblies/Azure.Core/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/PublicAssemblies/Azure.Core/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/Common7/IDE/DataCollectors/Azure.Core.DLL.\r\nLOG:
Attempting download of new URL file:///Q:/WebAndLoadTestProject1/TestResults/Out/Azure.Core.DLL.\r\nWRN: Comparing the assembly name resulted in the mismatch: Minor Version\r\nLOG:
Environment:
Visual Studio version is 16.11.9
Runtime Environment:
OS Name: Windows
OS Version: 2019 Server