diff --git a/build/Common.nonprod.props b/build/Common.nonprod.props
index 1b7ed15854..9f866b82f1 100644
--- a/build/Common.nonprod.props
+++ b/build/Common.nonprod.props
@@ -30,6 +30,7 @@
$(OpenTelemetryCoreLatestVersion)
$(OpenTelemetryCoreLatestPrereleaseVersion)
net8.0;net6.0
+ net8.0
[2.8.2,3.0)
[2.9.0,3.0)
[1.6.3,2.0)
diff --git a/src/OpenTelemetry.Exporter.OneCollector/CHANGELOG.md b/src/OpenTelemetry.Exporter.OneCollector/CHANGELOG.md
index ad0bb5a576..79451efd20 100644
--- a/src/OpenTelemetry.Exporter.OneCollector/CHANGELOG.md
+++ b/src/OpenTelemetry.Exporter.OneCollector/CHANGELOG.md
@@ -2,6 +2,9 @@
## Unreleased
+* Drop support for .NET 6 as this target is no longer supported.
+ ([#2123](https://github.com/open-telemetry/opentelemetry-dotnet-contrib/pull/2123))
+
## 1.10.0-alpha.1
Released 2024-Sep-06
diff --git a/src/OpenTelemetry.Exporter.OneCollector/CompatibilitySuppressions.xml b/src/OpenTelemetry.Exporter.OneCollector/CompatibilitySuppressions.xml
index c1b34f2891..9d4d66e28f 100644
--- a/src/OpenTelemetry.Exporter.OneCollector/CompatibilitySuppressions.xml
+++ b/src/OpenTelemetry.Exporter.OneCollector/CompatibilitySuppressions.xml
@@ -2,11 +2,18 @@
+
+ CP0008
+ T:OpenTelemetry.Exporter.OneCollector.OneCollectorExporterSerializationExceptionStackTraceHandlingType
+ lib/net6.0/OpenTelemetry.Exporter.OneCollector.dll
+ lib/netstandard2.1/OpenTelemetry.Exporter.OneCollector.dll
+ true
+
CP0008
T:OpenTelemetry.Exporter.OneCollector.OneCollectorExporterSerializationExceptionStackTraceHandlingType
lib/net7.0/OpenTelemetry.Exporter.OneCollector.dll
- lib/net6.0/OpenTelemetry.Exporter.OneCollector.dll
+ lib/netstandard2.1/OpenTelemetry.Exporter.OneCollector.dll
true
diff --git a/src/OpenTelemetry.Exporter.OneCollector/Internal/CallbackManager.cs b/src/OpenTelemetry.Exporter.OneCollector/Internal/CallbackManager.cs
index 513bcf83d5..ad33c02d29 100644
--- a/src/OpenTelemetry.Exporter.OneCollector/Internal/CallbackManager.cs
+++ b/src/OpenTelemetry.Exporter.OneCollector/Internal/CallbackManager.cs
@@ -20,7 +20,7 @@ public IDisposable Add(T callback)
lock (this.lockObject)
{
-#if NET8_0_OR_GREATER
+#if NET
ObjectDisposedException.ThrowIf(this.disposed, nameof(CallbackManager));
#else
if (this.disposed)
diff --git a/src/OpenTelemetry.Exporter.OneCollector/Internal/Serialization/BatchSerializationResult.cs b/src/OpenTelemetry.Exporter.OneCollector/Internal/Serialization/BatchSerializationResult.cs
index c3cc86222f..d7b6b94b86 100644
--- a/src/OpenTelemetry.Exporter.OneCollector/Internal/Serialization/BatchSerializationResult.cs
+++ b/src/OpenTelemetry.Exporter.OneCollector/Internal/Serialization/BatchSerializationResult.cs
@@ -5,7 +5,7 @@ namespace OpenTelemetry.Exporter.OneCollector;
internal readonly struct BatchSerializationResult
{
-#if NET8_0_OR_GREATER
+#if NET
public required int NumberOfItemsSerialized { get; init; }
public required int NumberOfItemsDropped { get; init; }
diff --git a/src/OpenTelemetry.Exporter.OneCollector/Internal/Serialization/CommonSchemaJsonSerializationHelper.cs b/src/OpenTelemetry.Exporter.OneCollector/Internal/Serialization/CommonSchemaJsonSerializationHelper.cs
index db94e2d1fd..dd3e4a4539 100644
--- a/src/OpenTelemetry.Exporter.OneCollector/Internal/Serialization/CommonSchemaJsonSerializationHelper.cs
+++ b/src/OpenTelemetry.Exporter.OneCollector/Internal/Serialization/CommonSchemaJsonSerializationHelper.cs
@@ -101,7 +101,7 @@ public static void SerializeValueToJson(object? value, Utf8JsonWriter writer)
writer.WriteStringValue(v);
return;
-#if NET8_0_OR_GREATER
+#if NET
case DateOnly v:
JsonMetadataServices.DateOnlyConverter.Write(writer, v, null!);
return;
@@ -111,7 +111,7 @@ public static void SerializeValueToJson(object? value, Utf8JsonWriter writer)
JsonMetadataServices.TimeSpanConverter.Write(writer, v, null!);
return;
-#if NET8_0_OR_GREATER
+#if NET
case TimeOnly v:
JsonMetadataServices.TimeOnlyConverter.Write(writer, v, null!);
return;
diff --git a/src/OpenTelemetry.Exporter.OneCollector/Internal/Transports/TransportSendRequest.cs b/src/OpenTelemetry.Exporter.OneCollector/Internal/Transports/TransportSendRequest.cs
index 2c71d15b6d..7ed65321d4 100644
--- a/src/OpenTelemetry.Exporter.OneCollector/Internal/Transports/TransportSendRequest.cs
+++ b/src/OpenTelemetry.Exporter.OneCollector/Internal/Transports/TransportSendRequest.cs
@@ -20,7 +20,7 @@ public TransportSendRequest()
#endif
}
-#if NET8_0_OR_GREATER
+#if NET
public required string ItemType { get; init; }
public required OneCollectorExporterSerializationFormatType ItemSerializationFormat { get; init; }
diff --git a/src/OpenTelemetry.Exporter.OneCollector/OpenTelemetry.Exporter.OneCollector.csproj b/src/OpenTelemetry.Exporter.OneCollector/OpenTelemetry.Exporter.OneCollector.csproj
index f7402e2fa1..5cea309c2c 100644
--- a/src/OpenTelemetry.Exporter.OneCollector/OpenTelemetry.Exporter.OneCollector.csproj
+++ b/src/OpenTelemetry.Exporter.OneCollector/OpenTelemetry.Exporter.OneCollector.csproj
@@ -1,10 +1,10 @@
- true
- An OpenTelemetry .NET exporter that sends telemetry to Microsoft OneCollector
- net8.0;net6.0;netstandard2.1;netstandard2.0
+ net8.0;netstandard2.1;netstandard2.0
$(TargetFrameworks);net462
+ true
+ An OpenTelemetry .NET exporter that sends telemetry to Microsoft OneCollector.
Exporter.OneCollector-
true
- $(SupportedNetTargets)
+ $(SupportedNetTargetsWithoutNet6)
$(TargetFrameworks);net48;net472;net471;net47;net462
+ Exe
+ Benchmark project for OpenTelemetry .NET OneCollectorExporter.
-
+
+
+
+
diff --git a/test/OpenTelemetry.Exporter.OneCollector.Tests/OpenTelemetry.Exporter.OneCollector.Tests.csproj b/test/OpenTelemetry.Exporter.OneCollector.Tests/OpenTelemetry.Exporter.OneCollector.Tests.csproj
index 54c7e19491..15509b13c8 100644
--- a/test/OpenTelemetry.Exporter.OneCollector.Tests/OpenTelemetry.Exporter.OneCollector.Tests.csproj
+++ b/test/OpenTelemetry.Exporter.OneCollector.Tests/OpenTelemetry.Exporter.OneCollector.Tests.csproj
@@ -1,16 +1,12 @@
- Unit test project for OpenTelemetry .NET OneCollectorExporter.
- $(SupportedNetTargets)
+ $(SupportedNetTargetsWithoutNet6)
$(TargetFrameworks);net48;net472;net471;net47;net462
+ Unit test project for OpenTelemetry .NET OneCollectorExporter.
-
-
-
-