open-telemetry / opentelemetry-dotnet-instrumentation

OpenTelemetry .NET Automatic Instrumentation
https://opentelemetry.io
Apache License 2.0
368 stars 92 forks source link

Simplify conditional compilation .NET #3798

Open Kielek opened 1 day ago

Kielek commented 1 day ago

There are many places in the code where we needed to change NET60_OR_GREATER to NET80_OR_GREATER. It seems like the intent of the directive in many, if not most of those locations was to use a version of the code that only applied to the .net build target and not the .net framework build target.

Where appropriate, should we change NET80_OR_GREATER to either NET or !NETFRAMEWORK, to make the intent clearer?

Originally posted by @nrcventura in https://github.com/open-telemetry/opentelemetry-dotnet-instrumentation/pull/3796#pullrequestreview-2449905884