Relatively new to the windows ecosystem. After following the windows documentation on setting up a background application on iot and google's quickstart for C#, I am receiving this error that I cannot seem to solve:
System.IO.IOException: 'Error loading native library "C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\BackgroundAppFirestoreOne-uwpVS.Debug_ARM.usernoname\grpc_csharp_ext.x86.dll". '
Stack Trace:
System.IO.IOException
HResult=0x80131620
Message=Error loading native library "C:\Data\Users\DefaultAccount\AppData\Local\DevelopmentFiles\BackgroundAppFirestoreOne-uwpVS.Debug_ARM.usernoname\grpc_csharp_ext.x86.dll".
Source=Grpc.Core
StackTrace:
at Grpc.Core.Internal.UnmanagedLibrary..ctor(String[] libraryPathAlternatives)
at Grpc.Core.Internal.NativeExtension.LoadUnmanagedLibrary()
at Grpc.Core.Internal.NativeExtension.LoadNativeMethods()
at Grpc.Core.Internal.NativeExtension..ctor()
at Grpc.Core.Internal.NativeExtension.Get()
at Grpc.Core.GrpcEnvironment.GrpcNativeInit()
at Grpc.Core.GrpcEnvironment..ctor()
at Grpc.Core.GrpcEnvironment.AddRef()
at Grpc.Core.Channel..ctor(String target, ChannelCredentials credentials, IEnumerable`1 options)
at Grpc.Core.Channel..ctor(String host, Int32 port, ChannelCredentials credentials, IEnumerable`1 options)
at Google.Api.Gax.Grpc.ChannelPool.GetChannel(ServiceEndpoint endpoint, IEnumerable`1 channelOptions, ChannelCredentials credentials)
at Google.Api.Gax.Grpc.ChannelPool.GetChannel(ServiceEndpoint endpoint, IEnumerable`1 channelOptions)
at Google.Cloud.Firestore.FirestoreDb.Create(String projectId, FirestoreClient client)
at BackgroundAppFirestoreOne.StartupTask.<Run>d__4.MoveNext() in C:\Users\usernoname\source\repos\BackgroundAppFirestoreOne\StartupTask.cs:line 95
The file is in the directory and does have the necessary permissions.
My environment:
Developing on Windows 10 with Visual Studios 2019 Enterprise
Deploying to a Dragonboard 410c with Windows 10 iot Core
Google.Cloud.Firestore NuGet referenced
I've tried:
Adding the gRPC.core as this suggested, as a NuGet package reference in VS2019, this did not solve the issue.
And I don't have any non-English characters as this suggests.
This error occurs when attempting to execute FirestoreDb db = FirestoreDb.Create(project);
(see line 44 of sample)
Does anyone know what this could be / what I could try to rectify?
I did not encount the exception with Google.Cloud.Firestore 1.1.0 on Windows IoT Core 17763. Could you please check the package version and OS version. BTW, it is not recommended to use the package in background app, since at the moment you can't register a headless app that uses filetypeAssociation, so that the app can not access the credential file(.json).
User contributions licensed under CC BY-SA 3.0