Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]: Invoke-Sqlcmd : Could not load file or assembly 'Azure.Core, Version=1.6.0.0, Culture=neutral #20025

Open
2 of 7 tasks
Varaprasad91 opened this issue Jun 18, 2024 · 2 comments

Comments

@Varaprasad91
Copy link

New issue checklist

Task name

Azurepowershell

Task version

5.241.0

Issue Description

$serverName = "$()"
$databaseName = "$()"
$userName = "$()"
$password = "$()"
$sql_query_ad_groups_list ="select distinct arm from [HMDP_Access_Management].[access_group] ag
inner join [HMDP_Access_Management].[access_object_group_assignment] aoga

$csvFilePath = "ad_groups_list.csv"
Invoke-Sqlcmd -ConnectionString "Server=$serverName;Database=$databaseName;User ID=$userName;Password=$password;Encrypt=True;TrustServerCertificate=False;Connection Timeout=30;" -Query $sql_query_ad_groups_list
|Export-Csv -Path $csvFilePath -NoTypeInformation

Environment type (Please select at least one enviroment where you face this issue)

  • Self-Hosted
  • Microsoft Hosted
  • VMSS Pool
  • Container

Azure DevOps Server type

dev.azure.com (formerly visualstudio.com)

Azure DevOps Server Version (if applicable)

No response

Operation system

windows 2019 and windows latest

Relevant log output

Invoke-Sqlcmd : Could not load file or assembly 'Azure.Core, Version=1.6.0.0, Culture=neutral, 
PublicKeyToken=92742159e12e44c8' or one of its dependencies. The system cannot find the file specified.
 D:\a\_temp\7ec9c846-c687-4604-ab85-bc00e6e70b6d.ps1:46 char:1
 Invoke-Sqlcmd -ConnectionString "Server=$serverName;Database=$databas ...

Full task logs with system.debug enabled

 [REPLACE THIS WITH YOUR INFORMATION] 

Repro steps

No response

@v-schhabra
Copy link
Contributor

Hi @https://github.com/microsoft/SQLServerPSModule/issues
Could you please check this issue?
It seems like the error is thrown from Invoke-Sqlcmd
Error record:
2024-06-18T08:14:18.7721788Z ##[debug]Invoke-Sqlcmd : Method not found: 'Void Microsoft.Data.SqlClient.AlwaysEncrypted.AzureKeyVaultProvider.SqlColumnEncryptionAzureKeyVaultProvider..ctor(Azure.Core.TokenCredential)'.

@Varaprasad91
Copy link
Author

Tired with different patterns of the version , but sadly nothing of them working out

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants