diff --git a/src/Directory.Build.props b/src/Directory.Build.props
index 6817e477a5..6a275d07be 100644
--- a/src/Directory.Build.props
+++ b/src/Directory.Build.props
@@ -59,4 +59,8 @@
+
+
+
+
diff --git a/src/Sentry.Analyzers/Sentry.Analyzers.csproj b/src/Sentry.Analyzers/Sentry.Analyzers.csproj
index dfc88485e7..4c3a60d8f1 100644
--- a/src/Sentry.Analyzers/Sentry.Analyzers.csproj
+++ b/src/Sentry.Analyzers/Sentry.Analyzers.csproj
@@ -24,8 +24,11 @@
https://github.com/SimonCropp/Polyfill
-->
-
+
+
+ true
+
diff --git a/src/Sentry.Compiler.Extensions/Sentry.Compiler.Extensions.csproj b/src/Sentry.Compiler.Extensions/Sentry.Compiler.Extensions.csproj
index 1927dbc94e..42bf7fb889 100644
--- a/src/Sentry.Compiler.Extensions/Sentry.Compiler.Extensions.csproj
+++ b/src/Sentry.Compiler.Extensions/Sentry.Compiler.Extensions.csproj
@@ -23,8 +23,11 @@
https://github.com/SimonCropp/Polyfill
-->
-
+
+
+ true
+
diff --git a/src/Sentry/Internal/Extensions/CollectionsExtensions.cs b/src/Sentry/Internal/Extensions/CollectionsExtensions.cs
index 8d7b6f7bdf..4184d5183c 100644
--- a/src/Sentry/Internal/Extensions/CollectionsExtensions.cs
+++ b/src/Sentry/Internal/Extensions/CollectionsExtensions.cs
@@ -75,12 +75,6 @@ public static IEnumerable> Append(
public static IReadOnlyList AsReadOnly(this IList list) =>
list as IReadOnlyList ?? new ReadOnlyCollection(list);
-#if !NET7_0_OR_GREATER
- public static IReadOnlyDictionary AsReadOnly(this IDictionary dictionary)
- where TKey : notnull =>
- new ReadOnlyDictionary(dictionary);
-#endif
-
public static IEnumerable ExceptNulls(this IEnumerable source) =>
source.Where(x => x != null).Select(x => x!);
diff --git a/src/Sentry/Sentry.csproj b/src/Sentry/Sentry.csproj
index 6c6ffe39ee..1e73b0ed72 100644
--- a/src/Sentry/Sentry.csproj
+++ b/src/Sentry/Sentry.csproj
@@ -64,7 +64,9 @@
https://github.com/SimonCropp/Polyfill
-->
-
+
+
+