Skip to content

Upgrade to net8, net9 and net10#216

Open
PhenX wants to merge 3 commits intomasterfrom
upgrade-net8-9-10
Open

Upgrade to net8, net9 and net10#216
PhenX wants to merge 3 commits intomasterfrom
upgrade-net8-9-10

Conversation

@PhenX
Copy link
Member

@PhenX PhenX commented Mar 21, 2026

No description provided.

@PhenX PhenX requested review from Copilot and koenbeuk March 21, 2026 21:16
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates the repository to build and test against newer .NET/EF Core versions by introducing centralized build/test configuration and package version management, and aligning tests/samples with updated APIs.

Changes:

  • Multi-targets projects to net8.0;net9.0;net10.0, adds global.json, and centralizes package versions in Directory.Packages.props.
  • Simplifies test project .csproj files by moving common test settings/references into test/Directory.Build.props.
  • Updates tests and samples to newer xUnit assertions and async trigger interfaces/overloads.

Reviewed changes

Copilot reviewed 37 out of 37 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
test/EntityFrameworkCore.Triggered.Transactions.Tests/TriggeredSessionExtensionsTests.cs Uses Assert.Single for clearer invocation assertions.
test/EntityFrameworkCore.Triggered.Transactions.Tests/TriggeredDbContextTests.cs Uses Assert.Single for trigger invocation assertions.
test/EntityFrameworkCore.Triggered.Transactions.Tests/EntityFrameworkCore.Triggered.Transactions.Tests.csproj Removes local package versions to rely on central management.
test/EntityFrameworkCore.Triggered.Tests/TriggerSessionTests.cs Replaces count assertions with Assert.Single/Assert.Empty.
test/EntityFrameworkCore.Triggered.Tests/TriggerServiceApplicationDependenciesTests.cs Replaces count assertions with Assert.Single/Assert.Empty.
test/EntityFrameworkCore.Triggered.Tests/Infrastructure/ServiceCollectionExtensionsTests.cs Updates assertions and adjusts AddTriggeredDbContextFactory overload usage.
test/EntityFrameworkCore.Triggered.Tests/EntityFrameworkCore.Triggered.Tests.csproj Simplifies references; relies on shared test props/central packages.
test/EntityFrameworkCore.Triggered.Tests/EFCore5DbContextTests.cs Uses Assert.Single for trigger invocation assertions.
test/EntityFrameworkCore.Triggered.IntegrationTests/EntityFrameworkCore.Triggered.IntegrationTests.csproj Simplifies package refs and keeps project reference to extensions.
test/EntityFrameworkCore.Triggered.Extensions.Tests/TriggerContextOptionsBuilderExtensionsTests.cs Uses Assert.DoesNotContain for clearer intent.
test/EntityFrameworkCore.Triggered.Extensions.Tests/ServiceCollectionExtensionsTests.cs Uses Assert.DoesNotContain for clearer intent.
test/EntityFrameworkCore.Triggered.Extensions.Tests/EntityFrameworkCore.Triggered.Extensions.Tests.csproj Simplifies package refs; relies on central management.
test/Directory.Build.props Adds shared test TFMs + common test package references and a project reference.
src/EntityFrameworkCore.Triggered/EntityFrameworkCore.Triggered.csproj Removes explicit EF Core version to rely on central management.
src/Directory.Build.props Switches to multi-targeting net8/9/10 and centralizes SourceLink versioning.
samples/Directory.Build.props Removes sample-specific version properties.
samples/4 - BlazorTests/Triggers/Counts/SetCreatedOn.cs Migrates to async trigger interface/method name.
samples/4 - BlazorTests/Triggers/Counts/PublishCountAddedEvent.cs Migrates to async trigger interface/method name.
samples/4 - BlazorTests/Startup.cs Updates AddTriggeredDbContextFactory overload usage.
samples/4 - BlazorTests/4 - BlazorTests.csproj Targets net10 and switches from package to project reference.
samples/3 - StudentManagerAspNetCore/Triggers/Traits/SoftDelete/EnsureSoftDelete.cs Migrates to async trigger interface/method name.
samples/3 - StudentManagerAspNetCore/Triggers/Traits/Audited/CreateAuditRecord.cs Migrates to async trigger interface/method name.
samples/3 - StudentManagerAspNetCore/Triggers/Students/SignupToMandatoryCourses.cs Migrates to async trigger interface/method name.
samples/3 - StudentManagerAspNetCore/Triggers/Students/AssignRegistrationDate.cs Migrates to async trigger interface/method name.
samples/3 - StudentManagerAspNetCore/Triggers/StudentCourses/SendWelcomingEmail.cs Migrates to async trigger interface/method name.
samples/3 - StudentManagerAspNetCore/Triggers/StudentCourses/BlockRemovalWhenCourseIsMandatory.cs Migrates to async trigger interface/method name.
samples/3 - StudentManagerAspNetCore/Triggers/Courses/AutoSignupStudents.cs Migrates to async trigger interface/method name.
samples/3 - StudentManagerAspNetCore/3 - StudentManagerAspNetCore.csproj Targets net10 and switches from package to project reference.
samples/2 - PrimarySchool/Triggers/StudentSignupToMandatoryCourses.cs Migrates to async trigger interface/method name.
samples/2 - PrimarySchool/2 - PrimarySchool.csproj Targets net10 and switches from package to project reference.
samples/1 - HelloWorld/Triggers/StudentAssignRegistrationDate.cs Migrates to async trigger interface/method name.
samples/1 - HelloWorld/1 - HelloWorld.csproj Targets net10 and switches from package to project reference.
global.json Pins repository SDK selection to 10.0.100.
benchmarks/EntityFrameworkCore.Triggered.Benchmarks/EntityFrameworkCore.Triggered.Benchmarks.csproj Moves to net10 and central package versions.
EntityFrameworkCore.Triggered.sln Adds new props/central package files as solution items.
Directory.Packages.props Introduces central package management with TFM-specific versions.
Directory.Build.props Updates repo-wide language/version/build properties and formatting.
Comments suppressed due to low confidence (1)

test/EntityFrameworkCore.Triggered.Tests/EntityFrameworkCore.Triggered.Tests.csproj:1

  • With test/Directory.Build.props adding a ProjectReference to EntityFrameworkCore.Triggered, this explicit ProjectReference can become a duplicate once the props path is corrected. Duplicated ProjectReference items can lead to noisy builds (duplicate item warnings) and makes dependencies harder to reason about. Prefer defining this reference in only one place: either remove it here and keep it centralized in test/Directory.Build.props, or remove the centralized reference and keep per-project references (or conditionally include it only for projects that need it).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\..\src\EntityFrameworkCore.Triggered\EntityFrameworkCore.Triggered.csproj" />
Copy link

Copilot AI Mar 21, 2026

Choose a reason for hiding this comment

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

The ProjectReference path is incorrect relative to test/Directory.Build.props. From the test folder, ..\\..\\src\\... resolves outside the repository and will fail to resolve the project. Change it to ..\\src\\EntityFrameworkCore.Triggered\\EntityFrameworkCore.Triggered.csproj.

Suggested change
<ProjectReference Include="..\..\src\EntityFrameworkCore.Triggered\EntityFrameworkCore.Triggered.csproj" />
<ProjectReference Include="..\src\EntityFrameworkCore.Triggered\EntityFrameworkCore.Triggered.csproj" />

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants