Any idea how to solve this. I tried updating nuget packages. But it did not solve the problem. TargetFramework is net6.0.
Asked
Active
Viewed 233 times
1 Answers
2
Error is very clear from the error message.
This package doesn't support .Net 6.
It supports only the .net framework, not the .net core. So you should not use it in .Net 6 target framework apps.
Microsoft.ApplicationInsights.Web also doesn't support .Net 6.

Vivek Nuna
- 25,472
- 25
- 109
- 197
-
So what should I use instead? @vivek – NeWi-SL Nov 29 '22 at 11:10
-
Also it's not a direct reference that I have added. It was referenced by another dependency. – NeWi-SL Nov 29 '22 at 11:13
-
I have attached all the references to the question. – NeWi-SL Nov 29 '22 at 11:17
-
Do you know by which package it got added? – Vivek Nuna Nov 29 '22 at 11:18
-
I believe it might come from `System.Diagnostics.DiagnosticSource` – NeWi-SL Nov 29 '22 at 11:19
-
which version have you installed? – Vivek Nuna Nov 29 '22 at 11:22
-
It's `v6.0.0.0` . There is another project as a ProjectReference. I'll attach it's references to the project as well – NeWi-SL Nov 29 '22 at 11:30
-
Sorry it's `Microsoft.ApplicationInsights.Web` not `Diagnostics` – NeWi-SL Nov 29 '22 at 11:39
-
it also doesn't support .Net 6 – Vivek Nuna Nov 29 '22 at 11:41
-
I can't downgrade the project. What is your suggestion? Also I've updated the question please see – NeWi-SL Nov 29 '22 at 11:49
-
`Microsoft.ApplicationInsights.Web` itself only supports .NET Framework, so it shouldn't be in your .NET 6 project in the first place. How long has it been there? – Orion Nov 29 '22 at 12:30