azure-cosmos-dotnet-v3: .Net Maui iOS project crashes

Describe the bug My .Net Maui iOS app crashes when navigating to the code that uses the Microsoft.Azure.Cosmos package. It works great with Android. Should I try the Azure.Cosmos 4.0.0-preview3?

To Reproduce Add Microsoft.Azure.Cosmos package to project. iOS crashes on this line FeedResponse<MyObject> currentResultSet = await queryResultSetIterator.ReadNextAsync();

I’m only able to build from command line (.Net Maui issue). I’m using the following parameter /p:EnableAssemblyILStripping=false. I’ve also tried /p:MtouchLink=none for the Linker Behavior. Not sure if there is some other flag I need?

Expected behavior Retrieve data from Azure Cosmos database

Actual behavior App crashes

Environment summary .Net Maui RC2 Visual Studio: 17.2 Preview 6 SDK Version: 3.26.1 OS Version: iOS 15.4.1

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Reactions: 1
  • Comments: 17 (8 by maintainers)

Most upvoted comments

I’m still unsuccessful at getting Microsoft.Azure.Cosmos to work with iOS in Release mode. Works just fine in Debug. This is the error I’m getting.

C:\Program Files\dotnet\packs\Microsoft.iOS.Sdk\15.4.300-rc.3.83\targets\Xamarin.Shared.Sdk.targets(747,3): error : ILStrip failed for C:/Users/ttirr/.nuget/packages/microsoft.azure. cosmos/3.27.0/runtimes/win-x64/native/Microsoft.Azure.Cosmos.ServiceInterop.dll: The image is not a managed assembly [C:\Repos\MakerBreaker\MakerBreaker\MakerBreaker.csproj]