Skip to content
Open
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
14 changes: 13 additions & 1 deletion nuget.config
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<configuration>
<packageSources>

<clear />
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" />

Expand All @@ -14,6 +13,9 @@
<!-- from perfview -->
<add key="dotnet-public" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-public/nuget/v3/index.json" />
<add key="perfview-build" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/perfview-build/nuget/v3/index.json" />

<!-- Needed for: Microsoft.CodeAnalysis.Testing (https://github.com/dotnet/roslyn-sdk/tree/main/src/Microsoft.CodeAnalysis.Testing) -->
<add key="dotnet-tools" value="https://pkgs.dev.azure.com/dnceng/public/_packaging/dotnet-tools/nuget/v3/index.json" />
</packageSources>

<packageSourceMapping>
Expand All @@ -32,5 +34,15 @@
<packageSource key="mattleibow">
<package pattern="DeviceRunners.*" />
</packageSource>
<packageSource key="dotnet-tools">
<package pattern="Microsoft.CodeAnalysis.Analyzer.Testing" />
<package pattern="Microsoft.CodeAnalysis.CodeFix.Testing" />
<package pattern="Microsoft.CodeAnalysis.CodeRefactoring.Testing" />
<package pattern="Microsoft.CodeAnalysis.SourceGenerators.Testing" />
<package pattern="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" />
<package pattern="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" />
<package pattern="Microsoft.CodeAnalysis.CSharp.CodeRefactoring.Testing" />
<package pattern="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing" />
</packageSource>
</packageSourceMapping>
</configuration>
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,6 @@

<PackageReference Include="EntityFramework" Version="6.5.1" />
<PackageReference Include="Effort.EF6" Version="2.2.16" />

<!-- this is needed because the version that is brought in transitively has a vulnerability warning -->
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />
</ItemGroup>

</Project>
8 changes: 1 addition & 7 deletions src/Sentry/Sentry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -83,13 +83,7 @@

<!-- Ensure at least version 6 of System.Text.Json so we have JsonSerializationContext available -->
<ItemGroup Condition="$(TargetFramework.StartsWith('net4')) or $(TargetFramework.StartsWith('netstandard'))">
<PackageReference Include="System.Text.Json" Version="8.0.5" >
<!--
Ignoring the vulnerability warning: https://github.com/advisories/GHSA-hh2w-p6rv-4g7w
The app can/should pin to the latest version. We will bump once a patch on v6 (still LTS until Nov 24) is out
-->
<NoWarn>NU1903</NoWarn>
</PackageReference>
<PackageReference Include="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<!--
Expand Down
5 changes: 1 addition & 4 deletions test/Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,9 @@
<PackageReference Include="coverlet.collector" Version="6.0.4" />
</ItemGroup>

<!-- these are needed because the versions that are brought in transitively have vulnerability warnings -->
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="13.0.3"/>
</ItemGroup>
<ItemGroup Condition="$(TargetFramework.StartsWith('net4'))">
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

</Project>
28 changes: 14 additions & 14 deletions test/Sentry.Analyzers.Tests/Sentry.Analyzers.Tests.csproj
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>$(PreviousTfm)</TargetFramework>
<Nullable>enable</Nullable>
<PropertyGroup>
<TargetFramework>$(PreviousTfm)</TargetFramework>
<Nullable>enable</Nullable>

<IsPackable>false</IsPackable>
</PropertyGroup>
<IsPackable>false</IsPackable>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.2"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.2"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.0"/>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.0"/>
</ItemGroup>
<ItemGroup>
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.3-beta1.25564.1" />
Copy link
Collaborator

@jamescrosswell jamescrosswell Nov 23, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

beta??? Should we stick to the stable packages?

Copy link
Member Author

@Flash0ver Flash0ver Nov 24, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The Microsoft.CodeAnalysis.*.Testing packages are updated rarely and irregularly on the NuGet.org feed.

image

The documentation of Microsoft.CodeAnalysis.Testing is listing the Azure Packages feed for prerelease packages.

The currently latest version on NuGet.org - v1.1.2 - brings in a transitive dependencies with a high vulnerability. Trying to fix that via:

<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Analyzer.Testing" Version="1.1.2" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.2" />

<!-- https://github.com/advisories/GHSA-447r-wph3-92pm -->
<PackageReference Include="System.Formats.Asn1" Version="6.0.1" />

has caused error NU1510: Warning As Error: PackageReference System.Formats.Asn1 will not be pruned. Consider removing this package from your dependencies, as it is likely unnecessary. on CI when running msbuild: https://github.com/getsentry/sentry-dotnet/actions/runs/19544130525/job/55958403935

I wasn't able to quickly find a solution to the "Pruning" problem. I didn't want to suppress the diagnostic by passing it to the msbuild command in the workflow, to avoid hiding unrelated problems. Using the latest pre-release was the quickest solution I came up with.

Due to that vulnerability warning (as error), and the relatively "old" latest on NuGet.org, I opted to use the pre-release from the Azure Packages feed, to kill two birds with one stone.

Copy link
Collaborator

@jamescrosswell jamescrosswell Nov 25, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NU1510 usually means the package reference is unnecessary but it may only be unnecessary for one of our targets (e.g. .net 10)... so you might be able to fix by making the Asn1 reference conditional on the tfm being net9 or earlier. This has worked for me in the past.

Let me know if this doesn't work and I guess we can use a pre-release of the testing package if there are no alternatives.

<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing" Version="1.1.3-beta1.25564.1" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.0" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.3.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\Sentry.Analyzers\Sentry.Analyzers.csproj" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\src\Sentry.Analyzers\Sentry.Analyzers.csproj" />
</ItemGroup>

<ItemGroup>
<Using Remove="Sentry.*" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,30 +18,35 @@
<PackageReference Include="Verify.EntityFramework" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.0" />
<!-- https://github.com/advisories/GHSA-m5vv-6r4h-3vj9 -->
<PackageReference Include="Azure.Identity" Version="1.11.4" />
</ItemGroup>

<!-- Test EF Core 8 on .NET 8 -->
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Verify.EntityFramework" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.0" />
<!-- https://github.com/advisories/GHSA-m5vv-6r4h-3vj9 -->
<PackageReference Include="Azure.Identity" Version="1.11.4" />
<!-- https://github.com/advisories/GHSA-qj66-m88j-hmgj -->
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
</ItemGroup>

<!-- Test EF Core 3.1 on .NET Framework -->
<ItemGroup Condition="'$(TargetFramework)' == 'net48' ">
<ItemGroup Condition="'$(TargetFramework)' == 'net48'">
<ProjectReference Include="..\..\src\Sentry.DiagnosticSource\Sentry.DiagnosticSource.csproj" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.32" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="3.1.32" />
<!-- https://github.com/advisories/GHSA-m5vv-6r4h-3vj9 -->
<PackageReference Include="Azure.Identity" Version="1.11.4" />
</ItemGroup>

<ItemGroup>
<PackageReference Include="LocalDb" Version="18.0.1" />
</ItemGroup>

<ItemGroup>
<!-- this is needed because the version that is brought in transitively has a vulnerability warning -->
<PackageReference Include="System.Drawing.Common" Version="6.0.0" />

<ProjectReference Include="..\..\src\Sentry.Extensions.Logging\Sentry.Extensions.Logging.csproj" />
<ProjectReference Include="..\Sentry.Testing\Sentry.Testing.csproj" />
<ProjectReference Include="..\..\src\Sentry\Sentry.csproj" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="8.0.0" />
<!-- https://github.com/advisories/GHSA-qj66-m88j-hmgj -->
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
</ItemGroup>

<!-- Test .NET Framework -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
</PropertyGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.0" />
<PackageReference Include="Microsoft.Extensions.Configuration.Json" Version="6.0.1" />
<ProjectReference Include="..\..\src\Sentry.Extensions.Logging\Sentry.Extensions.Logging.csproj" />
<ProjectReference Include="..\Sentry.Testing\Sentry.Testing.csproj" />
</ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,6 @@
<PackageReference Include="Microsoft.Maui.Controls" Version="$(MauiVersion)"/>
<PackageReference Include="Microsoft.Maui.Core" Version="$(MauiVersion)"/>
<PackageReference Include="Microsoft.Maui.Essentials" Version="$(MauiVersion)"/>

<!-- https://github.com/advisories/GHSA-5f2m-466j-3848 -->
<PackageReference Include="System.Private.Uri" Version="4.3.2"/>
</ItemGroup>

<!-- Configure XUnit -->
Expand Down
Loading