Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -59,4 +59,8 @@
<PackageReference Include="SIL.ReleaseTasks" Version="2.5.0" PrivateAssets="All" Condition="'$(Configuration)' != 'Debug'" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp' And '$(MSBuildProjectName)' != 'Sentry' And $(MSBuildProjectName.StartsWith('Sentry.'))">
<Using Include="Polyfills" />
</ItemGroup>

</Project>
5 changes: 4 additions & 1 deletion src/Sentry.Analyzers/Sentry.Analyzers.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,11 @@
https://github.com/SimonCropp/Polyfill
-->
<ItemGroup>
<PackageReference Include="Polyfill" Version="1.33.2" PrivateAssets="all" />
<PackageReference Include="Polyfill" Version="11.4.1" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<PolyfillNoWarnIncorrectVersion>true</PolyfillNoWarnIncorrectVersion>
</PropertyGroup>

<ItemGroup>
<Using Remove="System.Text.Json" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,11 @@
https://github.com/SimonCropp/Polyfill
-->
<ItemGroup>
<PackageReference Include="Polyfill" Version="1.33.2" PrivateAssets="all" />
<PackageReference Include="Polyfill" Version="11.4.1" PrivateAssets="all" />
</ItemGroup>
<PropertyGroup>
<PolyfillNoWarnIncorrectVersion>true</PolyfillNoWarnIncorrectVersion>
</PropertyGroup>

<ItemGroup>
<Using Remove="System.Text.Json" />
Expand Down
6 changes: 0 additions & 6 deletions src/Sentry/Internal/Extensions/CollectionsExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,12 +75,6 @@ public static IEnumerable<KeyValuePair<TKey, TValue>> Append<TKey, TValue>(
public static IReadOnlyList<T> AsReadOnly<T>(this IList<T> list) =>
list as IReadOnlyList<T> ?? new ReadOnlyCollection<T>(list);

#if !NET7_0_OR_GREATER
public static IReadOnlyDictionary<TKey, TValue> AsReadOnly<TKey, TValue>(this IDictionary<TKey, TValue> dictionary)
where TKey : notnull =>
new ReadOnlyDictionary<TKey, TValue>(dictionary);
#endif

public static IEnumerable<T> ExceptNulls<T>(this IEnumerable<T?> source) =>
source.Where(x => x != null).Select(x => x!);

Expand Down
4 changes: 3 additions & 1 deletion src/Sentry/Sentry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,9 @@
https://github.com/SimonCropp/Polyfill
-->
<ItemGroup>
<PackageReference Include="Polyfill" Version="1.33.2" PrivateAssets="all" />
<PackageReference Include="Polyfill" Version="11.4.1" PrivateAssets="all" />
<!-- Unused, and its TValue lacks the DynamicallyAccessedMembers annotation ConditionalWeakTable requires (IL2091) -->
<Compile Remove="$(NuGetPackageRoot)polyfill/*/contentFiles/cs/*/Polyfill_ConditionalWeakTable.cs" />
</ItemGroup>

<!--
Expand Down
4 changes: 4 additions & 0 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,8 @@
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup Condition="'$(TargetFrameworkIdentifier)' != '.NETCoreApp' And '$(MSBuildProjectName)' != 'Sentry' And $(MSBuildProjectName.StartsWith('Sentry.'))">
<Using Include="Polyfills" />
</ItemGroup>

</Project>