visual-studio - VS for MAC 和 DocumentDb.Core - BCrypt.DLL 丢失

标签 visual-studio azure .net-core azure-cosmosdb

当我到达 new DocumentClient(new Uri("https://192.168.30.104:10251"), _key) 行时,我得到一个 bcrypt.dll not found.
我正在使用 VS for Mac,最新版本和 DocumentDb.Core nugget 包版本 1.3.2(最新版本)...

我试了一下并降级到版本 1.0.0 但我遇到了同样的错误...

堆栈跟踪是:

at Microsoft.Azure.Documents.SecureStringHMACSHA256Helper.NativeMethods.BCryptOpenAlgorithmProvider(IntPtr& algorithmHandle, String algorithmId, IntPtr implementation, UInt32 flags)
at Microsoft.Azure.Documents.SecureStringHMACSHA256Helper..ctor(SecureString base64EncodedKey)
at Microsoft.Azure.Documents.Client.DocumentClient..ctor(Uri serviceEndpoint, SecureString authKey, ConnectionPolicy connectionPolicy, Nullable`1 desiredConsistencyLevel)

编辑1
我把代码邮寄给 friend ,他在常规VS 2017上运行没有错误

最佳答案

DocumentClient 类有多个构造函数。您正在使用one that takes a SecureString作为第二个参数。如果您使用 constructor that takes a plain string那么你的代码应该可以工作。

我确实同意这可能是一个错误。

关于visual-studio - VS for MAC 和 DocumentDb.Core - BCrypt.DLL 丢失,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45327992/

相关文章:

visual-studio - 有没有办法最大化 Visual Studio 中的当前选项卡?

Android/C++ - 命令 ""\bin\ant.bat"以代码 3 退出

visual-studio - 在 Visual Studio 中更改或添加默认编辑器

azure - 当我缩减 Azure 角色时哪些实例会停止?

c# - 如何在 MVC Core 中将 JS/CSS Cdn 添加到网站中?

visual-studio - 安装 CTP2 后未加载多设备混合应用程序模板

azure - Microsoft.Identity.Web 和 ASP.NET Core SignalR JWT 身份验证

function - 使用 powershell 更改运行时版本 azure 函数

c# - Visual Studio 中的私有(private)对象

.net-core - 您可以使用.net core运行F#脚本文件(.fsx)吗?