stevejgordon / CorrelationId

An ASP.NET Core middleware component which synchronises a correlation ID for cross API request logging.
MIT License
559 stars 106 forks source link

Error: IHttpClientbuilder does not contain a definition for AddCorrelationIdForwarding #78

Closed suthishnairs closed 4 years ago

suthishnairs commented 4 years ago

Error: IHttpClientbuilder does not contain a definition for AddCorrelationIdForwarding

Getting error while configuring AddCorrelationIdForwarding() in startup.cs. services.AddHttpClient("MyClient") .AddCorrelationIdForwarding(); //.AddHttpMessageHandler();

CorrelationId latest packages installed thru nuget manager (VS 2019, .Net Core 3.1). CorrelationId -Version 2.1.0

Added missing references, but error keeps showing. using CorrelationId; using CorrelationId.DependencyInjection; using CorrelationId.HttpClient;

djmnz commented 4 years ago

I think you are having the same issue as I had - looking into the example :) The example in master is using the latest version, which is not released yet.

I managed to fix the issue by installing the preview version of the package (preview 3.0) - you need to enable that in your nuget package manager.

suthishnairs commented 4 years ago

Thank You,

When 3.0 going to live?

https://github.com/stevejgordon/CorrelationId/wiki/v2.x-(Current) --> Samples

stevejgordon commented 4 years ago

Hey @suthishnairs! Apologies for the delay. I've been battle testing the preview for a while and it seems to hold up just fine. I've not had any issues or complaints to suggest it needs much more work, so I think I should release this soon. The main delay was waiting for me to get around to adding documentation for 3.0 breaking changes and usage (https://github.com/stevejgordon/CorrelationId/issues/63). I'll try to get onto that and look to push this fairly soon.

stevejgordon commented 4 years ago

I'll close this now since docs are covering in another issue.

suthishnairs commented 4 years ago

I'll close this now since docs are covering in another issue.

Thank You Steve ..

When you releasing new version to public, any dates?

stevejgordon commented 4 years ago

Good news @suthishnairs! I pushed 3.0 release last week so you should be able to grab that now from NuGet. 😁