Skip to content
This repository has been archived by the owner on Nov 20, 2023. It is now read-only.

Object reference not set to an instance of an object on EventCounters for .NET 7 #1547

Open
slaterx opened this issue Feb 27, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@slaterx
Copy link

slaterx commented Feb 27, 2023

Describe the bug

We upgraded our code to .NET 7 and tye now prints these errors on log:

To Reproduce

  1. tye run
  2. 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.

@slaterx slaterx added the bug Something isn't working label Feb 27, 2023
@Phiph
Copy link

Phiph commented Mar 10, 2023

hey @slaterx,

Are you using a dotnet new project? Something like the sample weather controller api app.

.

@slaterx
Copy link
Author

slaterx commented Mar 13, 2023

No, this is an existing project started on .NET 6 and migrated off to .NET 7

@slaterx
Copy link
Author

slaterx commented Mar 29, 2023

@Phiph I tested with dotnet new, creating the sample weather controller api, and the result was the same.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants