简体   繁体   English

CosmosDB nuget软件包不可用

[英]CosmosDB nuget package not being available

When I read about standard libraries i understand it as it can be used with core and standard (correct me if I am wrong). 当我阅读标准库时,我了解它,因为它可以与核心和标准一起使用(如果我写错了,请更正我)。 I have created a Standard library as a data library. 我已经创建了一个标准库作为数据库。

I now want to implement DocumentDB so I added the nuget package: 我现在想实现DocumentDB,因此添加了nuget包: 在此处输入图片说明 So my dependencies looks like this: 所以我的依赖关系如下所示: Visual Studio依赖关系

However I am not able to use the nuget package: 但是我不能使用nuget包:

在此处输入图片说明

I dont get any errors, so I am guessing it must be the framework target? 我没有收到任何错误,所以我猜它一定是框架目标吗? Any pointers here? 这里有指针吗?

If you take a look at the dependencies on the Microsoft.Azure.DocumentDB package, it is dependent on .NET Framework v4.6.1. 如果您查看对Microsoft.Azure.DocumentDB包的依赖关系,则它依赖于.NET Framework v4.6.1。 While .NET Standard 2.0 allows the loading of packages from .NET Framework it's discouraged as you can run into unexpected errors. 尽管.NET Standard 2.0允许从.NET Framework加载程序包,但不建议这样做,因为您可能会遇到意外错误。

在此处输入图片说明

Instead you can use the Microsoft.Azure.DocumentDB.Core package or the new v3 package Microsoft.Azure.Cosmos as they both target .NET Standard directly so there will be no compatibility issues. 相反,您可以使用Microsoft.Azure.DocumentDB.Core软件包或新的v3软件包Microsoft.Azure.Cosmos,因为它们都直接针对.NET Standard,因此不会出现兼容性问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM