Google.Cloud.Datastore.V1 reference to Google.Apis.Auth
See original GitHub issueHi! When I try to use DatastoreDb.Create(projectId);
I get System.IO.FileLoadException with Google.Apis.Auth, Version=1.21.0.0. When I install 1.21.0, then the same problem appears, but with 1.41.1 version. When I update to 1.41.1, it wants 1.21.0 again.
I use Google.Cloud.Datastore.V1 version 2.2.0, but I checked that after upgrading my apps from .net 4.5.2 to 4.7.2, the problem still exists in 3.0.0-beta1 of library.
The assembly binding doesn’t help and I think I’ve tried installing every possible additional “Grpc” and “Apis”, but with no effect. Is there some workaround for this issue or should I wait for the finalization of the plan below to be able to use the library?
https://googleapis.github.io/google-cloud-dotnet/docs/guides/gax-dependencies.html
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
I’ve just tried this with a minimal example myself:
DatastoreDb.Create
and then allocates an ID to prove that we can make an RPCIt all worked fine. The console project has an autogenerated set of assembly binding redirects:
Interestingly, when testing the zip file I’ve attached here, I did find it initially failed due to a lack of gRPC libraries - but that’s not the error you’ve got. That’s fixed by adding a direct dependency from the application (the console app in this case) to Grpc.Core version 1.22.1 (or 2.27.0 for the GAX v3 libraries). Unfortunately the “old style” .NET project system isn’t terribly good at transitive dependencies - I’d expect an “SDK-style” project to work better on that front. Please try this zip file though, and see whether that works for you - if it does, we’ll need to work out the difference between this project and your one that can’t load Google.Apis.Auth.
Issue4415.zip
Thanks for confirming. I still don’t properly understand why I only needed to add the extra package to my console app after cleaning the project - things are a little mysterious in the old school world. (As a side-note, if you get the chance to upgrade to SDK-style projects, I’d strongly encourage that 😃 Glad it’s working for you now though!