Closed christopheblin closed 1 year ago
The Google.Cloud.Diagnostics.AspNetCore package targets ASP.NET Core 2.1, which is no longer supported by Microsoft - and cannot be used with the most up-to-date client libraries. (The version mismatch is with Google.Api.Gax.Grpc, not actually Grpc.Core itself.) A final version was released in January 2022, but we do not expect to release a new version that targets the latest version of Google.Api.Gax.Grpc.
Please update to Google.Cloud.Diagnostics.AspNetCore3, which should work for ASP.NET Core 3.1, 6 and 7. (We'd have liked to stick to one package, but there were some incompatibilities in ASP.NET Core 3.1 which meant we needed a separate package.)
If you really want to stick with Google.Cloud.Diagnostics.AspNetCore, you could use Google.Cloud.PubSub.V1 version 2.10.0, which is the latest release that targets the same version of GAX. But I'd strongly advise you to update to the AspNetCore3 package instead.
@jskeet thank you very much for the timely and accurate answer 👍
this is explained in https://cloud.google.com/trace/docs/setup/aspnetcore, which I completely overlooked since I was directed to https://cloud.google.com/trace/docs/setup/aspnet with my google search "https://www.google.com/search?q=.net+gcp+trace" :)
I'm trying to add
<PackageReference Include="Google.Cloud.Diagnostics.AspNetCore" Version="4.4.0" />
and to enable it during startup of my asp.net coreI receive a very weird exception, which looks like there is a problem with the way nuget packages are resolved
My csproj looks like
If I remove
<PackageReference Include="Google.Cloud.PubSub.V1" Version="3.2.0" />
, it works (well the AddGoogleDiagnosticsForAspNetCore still fails but not with the weird exception)=> could someone tell me how I am supposed to resolve the problem ?
To me, it looks like a conflict between
But I have no clue which version I can use ...