question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using Cosmos db in Xamarin.Forms Cross Platform

See original GitHub issue

Hi, I am trying to use cosmos db in Xamarin.Forms project but it is showing below errors:

**Severity Code Description Project File Line Suppression State

Error Can not resolve reference: Microsoft.Azure.Cosmos.Direct, referenced by Microsoft.Azure.Cosmos.Client. Please add a NuGet package or assembly reference for Microsoft.Azure.Cosmos.Direct, or remove the reference to Microsoft.Azure.Cosmos.Client. MobileApp1.Android**

Also, when I am adding this nuget then another error is showing as below:

Severity Code Description Project File Line Suppression State Error Can not resolve reference: Microsoft.Azure.Cosmos.Serialization.HybridRow, referenced by Microsoft.Azure.Cosmos.Client. Please add a NuGet package or assembly reference for Microsoft.Azure.Cosmos.Serialization.HybridRow, or remove the reference to Microsoft.Azure.Cosmos.Client. MobileApp1.Android

Please help me to out of this.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:10 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
ausfeldtcommented, Oct 14, 2019

@jameswhollister Interesting, depending on the order I build the project is succeeds or fails. Instead adding below to “XamarinAndCosmosNoLike” project, also will fix the issue, but consistently.

<PropertyGroup>
    <CopyLocalLockFileAssemblies>true</CopyLocalLockFileAssemblies>
</PropertyGroup>

Apparently this is a known issue that has been open for a while: https://github.com/xamarin/xamarin-macios/issues/3949

0reactions
jameswhollistercommented, Oct 14, 2019

@ausfeldt that did it. Thank you!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Consume an Azure Cosmos DB Document Database in ...
The process for integrating an Azure Cosmos DB document database into a Xamarin.Forms application is as follows: ... After performing these steps, ...
Read more >
Authenticate Users with an Azure Cosmos DB Document ...
This article explains how to combine access control with Azure Cosmos DB partitioned collections, so that a user can only access their own ......
Read more >
How To Create And Use Azure Cosmos DB In Xamarin. ...
Reading this article, you can learn how to create and use Azure Cosmos DB In Xamarin Forms application using Android with XAML and...
Read more >
Secretless Connection to CosmosDB from Xamarin Pt1-
Connect to CosmosDB and WebAPI with no Secrets or Keys in your Mobile App or WebAPI config, so no chance of checking them...
Read more >
Use "Microsoft.Azure.Cosmos" .NET SDK V3 in Xamarin. ...
I created a small mobile app using Xamarin.Forms This app use Cosmos DB (Azure Database). I need to know if it is possible...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found