UWP无法添加参考Microsoft.Azure.DocumentDB [英] UWP can't add reference Microsoft.Azure.DocumentDB

查看:105
本文介绍了UWP无法添加参考Microsoft.Azure.DocumentDB的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们计划将用户数据存储在cosmos DB中,但是在测试UWP应用中添加nuget 错误CS0234:类型或名称空间名称'Azure'在 命名空间"Microsoft"(您是否缺少程序集引用?).相同的nuget包云将在控制台应用程序中使用并正常工作.

We are planning to store user data in cosmos DB, but after we add nuget Microsoft.Azure.DocumentDB in a test UWP app, it reports an error: error CS0234: The type or namespace name 'Azure' does not exist in the namespace 'Microsoft' (are you missing an assembly reference?). The same nuget package cloud be use and work well in console application.

我们当前使用的版本是 2.2.1,

The version that we currently using is Microsoft.Azure.DocumentDB 2.2.1, Tuesday, December 25, 2018 (12/25/2018).

您可能会说我可以在包"中引用该dll.文件夹,我尝试过但也收到错误:

You may say that I could reference the dll in "packages" folder, I have tried it but also get error:

推荐答案

威廉你好,

是的,您使用的是.NETFramework库项目,而不是.NETCore库项目.请参阅以下NuGet页面以获取与此相关的依赖项信息:< span style =">

That is correct, your are using a .NETFramework library item and not a .NETCore library item. Please see the following NuGet page for dependency information related to this: Microsoft.Azure.DocumentDB

请查看 Microsoft.Azure .DocumentDB.Core ,因为这是您要用于带有Cosmos DB SQL API的基于.NETCore的项目的方法.

Please take a look at Microsoft.Azure.DocumentDB.Core as this is what you are looking to use for .NETCore based projects with Cosmos DB SQL API.

此致

迈克


这篇关于UWP无法添加参考Microsoft.Azure.DocumentDB的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆