Skip to content
This repository has been archived by the owner on Jun 10, 2020. It is now read-only.

Unable to use the ApplicationInsights.AspNetCore with Microsoft.Extensions.Logging of version higher than 1.1.2 #756

Closed
snowpardx opened this issue Sep 21, 2018 · 5 comments
Assignees
Labels
Milestone

Comments

@snowpardx
Copy link

Hello,
I attempting to use Microsoft.ApplicationInsights.AspNetCore package with up-to-date Microsoft.Extensions.Logging package. Unfortunately when Microsoft.Extensions.Logging of version higher than 1.1.2(e.g. 2.1.1) in use there is runtimer error caused by old version of Microsoft.Extensions.Configuration which Microsoft.ApplicationInsights.AspNetCore want.

Repro Steps

I created small sample which demonstrates the behaviour above. https://github.com/snowpardx/app-insights-failure/tree/master

And if try to run, we get the following exception
image

If switch to https://github.com/snowpardx/app-insights-failure/tree/no-error-if-using-old-package
Where only difference is
image

The runtime error gone.

Could you please check it out and provide the guidance how to use the package with recent versions of Microsoft.Extensions.Logging?

@snowpardx
Copy link
Author

Hi @cijothomas, are there any updates on this issue? If there is known ETA can you please share it?

@cijothomas cijothomas modified the milestones: 2.5.0, 2.6.0 Oct 22, 2018
@cijothomas
Copy link
Contributor

We are planning to add NETSTANDARD2.0 target to the SDK and update the logging packages to 2.XX version along with that. Its tagged for the upcoming stable release, so ~1-2 month ETA.
Thanks for your patience!

@RamjotSingh
Copy link

https://www.nuget.org/packages/Microsoft.Extensions.Logging.ApplicationInsights/2.9.0-beta3 should help with this error I think.

@snowpardx
Copy link
Author

@RamjotSingh thanks for the link, having the ILogger implementation (microsoft/ApplicationInsights-dotnet-logging#239 ) in main AppInsights repo is awesome. By the way it still doesn't allow use Microsoft.ApplicationInsights.AspNetCore package with Microsoft.Extensions.Logging v 2.* some reason to use this package are metrics additionally collected and rich customization possibilities (e.g. we can inject TelemetryClient here).

@cijothomas
Copy link
Contributor

WIP develop...cithomas/net20target
Started on this. Planning to complete this before next week :)

@cijothomas cijothomas modified the milestones: 2.6.0, 2.7.0 Jan 25, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

4 participants