Object reference not set to an instance of an object on EventCounters for .NET 7
slaterx opened this issue · comments
Describe the bug
We upgraded our code to .NET 7 and tye now prints these errors on log:
To Reproduce
tye run
- See the output on Microservice's log:
[13:42:22 ERR] Error processing counter for Microsoft.AspNetCore.Hosting:EventCounters
System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Tye.Hosting.Diagnostics.MetricSink.<>c__DisplayClass2_0.<Attach>b__0(TraceEvent traceEvent) in /_/src/Microsoft.Tye.Hosting.Diagnostics/MetricSink.cs:line 45
Further technical details
-
tye --version
0.11.0-alpha.22111.1+3edef5428949c518c078844d6438e5ba86fce600 -
The platform (Linux/macOS/Windows)
Reproducible on all platforms.
hey @slaterx,
Are you using a dotnet new
project? Something like the sample weather controller api app.
.
No, this is an existing project started on .NET 6 and migrated off to .NET 7
@Phiph I tested with dotnet new
, creating the sample weather controller api, and the result was the same.