Skip to content

Commit c94ca46

Browse files
LoopedBard3Copilot
authored andcommitted
Add SQLitePCLRaw.bundle_e_sqlite3 reference to EFCore.Sqlite.Benchmarks
Since the SQLitePCLRaw 3.x bump in #36551, every benchmark in EFCore.Sqlite.Benchmarks throws on [GlobalSetup]: System.Exception: You need to call SQLitePCL.raw.SetProvider(). If you are using a bundle package, this is done by calling SQLitePCL.Batteries.Init(). at SQLitePCL.raw.get_Provider() at SQLitePCL.raw.sqlite3_libversion() at Microsoft.Data.Sqlite.SqliteConnection.get_ServerVersion() at Microsoft.EntityFrameworkCore.Sqlite.Update.Internal .SqliteUpdateSqlGenerator..ctor(UpdateSqlGeneratorDependencies) ... at BenchmarkDotNet.Autogenerated.Runnable_0.GlobalSetup() In SQLitePCLRaw 3.x the bundle packages register the provider via a ModuleInitializer, so referencing SQLitePCLRaw.bundle_e_sqlite3 (the same package used by EFCore.Sqlite.FunctionalTests) is sufficient - no code change is needed. The package version is already pinned in the root Directory.Packages.props as SQLitePCLRaw.bundle_e_sqlite3 = $SQLitePCLRawVersion (3.0.3). The aspnet/Benchmarks benchmarks-ci-01 pipeline has been silently running zero EF Core measurements (every method reports NA in BDN, but crank treats BDN's normal exit as success) for roughly two months since 2026-03-19 / build 2930691. Verified locally with crank + crank-agent --profile local: before the fix every method is NA, after the fix all methods report real Mean and Op/s. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent 6ba8055 commit c94ca46

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

‎benchmark/EFCore.Sqlite.Benchmarks/EFCore.Sqlite.Benchmarks.csproj‎

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,16 @@
1616
<ProjectReference Include="..\..\src\EFCore.Sqlite.Core\EFCore.Sqlite.Core.csproj" />
1717
</ItemGroup>
1818

19+
<ItemGroup>
20+
<!--
21+
Register the SQLitePCLRaw provider via the bundle's [ModuleInitializer].
22+
Required since the SQLitePCLRaw 3.x bump (#36551): without this, every
23+
benchmark throws "You need to call SQLitePCL.raw.SetProvider()" from
24+
[GlobalSetup] and BenchmarkDotNet reports NA for every method.
25+
-->
26+
<PackageReference Include="SQLitePCLRaw.bundle_e_sqlite3" />
27+
</ItemGroup>
28+
1929
<ItemGroup>
2030
<None Update="AdventureWorks2014.db">
2131
<CopyToOutputDirectory>Always</CopyToOutputDirectory>

0 commit comments

Comments
 (0)