我需要使用幾個包在 C# 中的 Synapse 中運行筆記本。運行以下代碼段,出現錯誤:
using Microsoft.IdentityModel.Clients.ActiveDirectory;
using Microsoft.Azure;
using Microsoft.Azure.Storage;
using Microsoft.Azure.Storage.Auth;
using Microsoft.Azure.Storage.Blob;
using Microsoft.Azure.KeyVault;
(1,17): error CS0234: The type or namespace name 'IdentityModel' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
(3,17): error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
(4,17): error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
(5,17): error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
(6,17): error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
(7,17): error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?)
我參考了
發布安裝后,您可以使用using如下所示的關鍵字使用那些已安裝的包:

我們沒有找到以下任何要使用 Microsoft.Azure.Storage.Auth 安裝的塊包;使用 Microsoft.Azure;
對于存盤,您還可以安裝 Azure.Storage.Common nugget 包,其中包括 Azure Blob(物件)、Azure Data Lake Storage Gen2、Azure 檔案和 Azure 佇列庫。
using Microsoft.Azure.KeyVault;這個 nugget 包被棄用了一個較新的包可用Azure.Security.KeyVault.Secrets
根據您使用的 Key Vault 的功能(密鑰、機密或證書),請使用以下庫之一:
Azure.Security.KeyVault.Secrets
Azure.Security.KeyVault.Keys
Azure.Security.KeyVault.Certificates
這是Azure 突觸分析 SDK 庫的 git hub鏈接
uj5u.com熱心網友回復:
我不認為我有一個完整的答案給你,特別是因為你想要實作的目標并不明顯,但是這篇文章可能會幫助你處理筆記本中 Blob 資料的一些需求:https : //docs.microsoft.com /en-us/azure/synapse-analytics/spark/microsoft-spark-utilities?pivots=programming-language-csharp
在審查時,這看起來正是您需要的,因為有關于身份驗證和密鑰庫訪問的部分。
轉載請註明出處,本文鏈接:https://www.uj5u.com/shujuku/324518.html
上一篇:將檔案從特定日期復制到另一個目錄
