From 525a9a0d7ecaf20c4608195097dd4ee08f83cdae Mon Sep 17 00:00:00 2001 From: "dotnet-maestro[bot]" <42748379+dotnet-maestro[bot]@users.noreply.github.com> Date: Mon, 15 Jun 2026 09:49:12 -0700 Subject: [PATCH 1/5] Update dependencies from build 318531 (#38422) Updated Dependencies: Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk (Version 10.0.0-beta.26310.111 -> 10.0.0-beta.26312.109) Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.Abstractions, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.Logging, Microsoft.NETCore.App.Ref, System.Formats.Asn1, System.Runtime.Caching, System.Text.Encodings.Web, System.Text.Json (Version 10.0.10 -> 10.0.10) Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.NETCore.Platforms (Version 10.0.10-servicing.26310.111 -> 10.0.10-servicing.26312.109) [[ commit created by automation ]] Co-authored-by: dotnet-maestro[bot] --- NuGet.config | 2 +- eng/Version.Details.props | 10 ++++---- eng/Version.Details.xml | 48 +++++++++++++++++++-------------------- global.json | 8 +++---- 4 files changed, 34 insertions(+), 34 deletions(-) diff --git a/NuGet.config b/NuGet.config index df9a21798d6..a72aee61fa5 100644 --- a/NuGet.config +++ b/NuGet.config @@ -4,7 +4,7 @@ - + diff --git a/eng/Version.Details.props b/eng/Version.Details.props index d528d360d5f..d01d0073105 100644 --- a/eng/Version.Details.props +++ b/eng/Version.Details.props @@ -6,9 +6,9 @@ This file should be imported by eng/Versions.props - 10.0.0-beta.26310.111 - 10.0.0-beta.26310.111 - 10.0.0-beta.26310.111 + 10.0.0-beta.26312.109 + 10.0.0-beta.26312.109 + 10.0.0-beta.26312.109 10.0.10 10.0.10 10.0.10 @@ -16,10 +16,10 @@ This file should be imported by eng/Versions.props 10.0.10 10.0.10 10.0.10 - 10.0.10-servicing.26310.111 + 10.0.10-servicing.26312.109 10.0.10 10.0.10 - 10.0.10-servicing.26310.111 + 10.0.10-servicing.26312.109 10.0.10 10.0.10 10.0.10 diff --git a/eng/Version.Details.xml b/eng/Version.Details.xml index e58e5dbe8e5..924836b4af1 100644 --- a/eng/Version.Details.xml +++ b/eng/Version.Details.xml @@ -1,80 +1,80 @@ - + https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 - + https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 - + https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 - + https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 - + https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 - + https://github.com/dotnet/dotnet - e8558e6339cd4fccd998b5cdecb76eeb6ec75363 + efeff38742c1b54c1bb7056cfdde913a3a509376 diff --git a/global.json b/global.json index 96b0bbfc128..648026d926a 100644 --- a/global.json +++ b/global.json @@ -1,6 +1,6 @@ { "sdk": { - "version": "10.0.108", + "version": "10.0.109", "allowPrerelease": true, "rollForward": "latestMajor", "paths": [ @@ -10,7 +10,7 @@ "errorMessage": "The required .NET SDK wasn't found. Please run ./restore.sh or .\\restore.cmd to install it." }, "tools": { - "dotnet": "10.0.108", + "dotnet": "10.0.109", "runtimes": { "dotnet": [ "$(MicrosoftNETCorePlatformsVersion)" @@ -18,7 +18,7 @@ } }, "msbuild-sdks": { - "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26310.111", - "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26310.111" + "Microsoft.DotNet.Arcade.Sdk": "10.0.0-beta.26312.109", + "Microsoft.DotNet.Helix.Sdk": "10.0.0-beta.26312.109" } } From 5c96234e0610bb06ba67e1edda19945b4424ab87 Mon Sep 17 00:00:00 2001 From: Copilot <198982749+Copilot@users.noreply.github.com> Date: Mon, 15 Jun 2026 11:58:00 -0700 Subject: [PATCH 2/5] [release/10.0] Guard EF file generation during commandline builds to fix AOT build fork bomb (#38403) Co-authored-by: AndriySvyryd <6539701+AndriySvyryd@users.noreply.github.com> --- src/EFCore.Design/Design/Internal/DbContextOperations.cs | 5 ++++- .../Microsoft.EntityFrameworkCore.Tasks.targets | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/EFCore.Design/Design/Internal/DbContextOperations.cs b/src/EFCore.Design/Design/Internal/DbContextOperations.cs index c0a1e9e096c..358a67006fe 100644 --- a/src/EFCore.Design/Design/Internal/DbContextOperations.cs +++ b/src/EFCore.Design/Design/Internal/DbContextOperations.cs @@ -303,7 +303,10 @@ private IReadOnlyList PrecompileQueries( try { - workspace = MSBuildWorkspace.Create(); + // Set _EFGenerationStage to a non-empty value so that the design-time build performed by + // OpenProjectAsync below doesn't re-trigger the EF file generation targets. Otherwise the + // generation targets would invoke this operation again, resulting in a fork bomb. + workspace = MSBuildWorkspace.Create(new Dictionary { ["_EFGenerationStage"] = "build" }); workspace.LoadMetadataForReferencedProjects = true; #pragma warning disable CS0612 // Obsolete #pragma warning disable CS0618 // Obsolete diff --git a/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.targets b/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.targets index 882de3647e7..c79d14475df 100644 --- a/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.targets +++ b/src/EFCore.Tasks/buildTransitive/Microsoft.EntityFrameworkCore.Tasks.targets @@ -166,7 +166,7 @@ For Publish: This target has the same Inputs and Outputs as CoreCompile to run only if CoreCompile isn't going to be skipped --> TestHelpers.ExecuteWithStrategyInTransactionAsync( + CreateContext, + UseTransaction, + async context => + { + var widget = await context.Set().OrderBy(w => w.Id).FirstAsync(); + + // Replace the entire JSON-mapped complex property with a structure where one nested + // sub-collection (Inner) has grown from one element to two. The sibling sub-collection + // (Others) being present in the type definition is required to trigger the regression. + widget.Deep = new DeepData + { + Mid = new MiddleData + { + Items = + [ + new DeepItem + { + Title = "Item1", + Inner = + [ + new InnerEntry { Value = "inner-0" }, + new InnerEntry { Value = "inner-1" } + ], + Others = [] + } + ] + } + }; + + ClearLog(); + await context.SaveChangesAsync(); + }, + async context => + { + using (SuspendRecordingEvents()) + { + var widget = await context.Set().OrderBy(w => w.Id).FirstAsync(); + var item = Assert.Single(widget.Deep.Mid.Items); + Assert.Equal("Item1", item.Title); + Assert.Equal(2, item.Inner.Count); + Assert.Equal("inner-0", item.Inner[0].Value); + Assert.Equal("inner-1", item.Inner[1].Value); + Assert.Empty(item.Others); + } + }); + protected virtual void UseTransaction(DatabaseFacade facade, IDbContextTransaction transaction) => facade.UseTransaction(transaction.GetDbTransaction()); @@ -607,6 +656,7 @@ protected virtual IDisposable SuspendRecordingEvents() protected class ComplexCollectionJsonContext(DbContextOptions options) : DbContext(options) { public DbSet Companies { get; set; } = null!; + public DbSet Widgets { get; set; } = null!; } protected class CompanyWithComplexCollections @@ -645,6 +695,34 @@ protected class Department public decimal Budget { get; set; } } + protected class WidgetWithDeepJson + { + public int Id { get; set; } + public required DeepData Deep { get; set; } + } + + protected class DeepData + { + public required MiddleData Mid { get; set; } + } + + protected class MiddleData + { + public List Items { get; set; } = []; + } + + protected class DeepItem + { + public required string Title { get; set; } + public List Inner { get; set; } = []; + public List Others { get; set; } = []; + } + + protected class InnerEntry + { + public required string Value { get; set; } + } + public abstract class ComplexCollectionJsonUpdateFixtureBase : SharedStoreFixtureBase { protected override string StoreName @@ -660,7 +738,8 @@ protected override Type ContextType => typeof(ComplexCollectionJsonContext); protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext context) - => modelBuilder.Entity(b => + { + modelBuilder.Entity(b => { b.Property(x => x.Id).ValueGeneratedNever(); @@ -686,6 +765,26 @@ protected override void OnModelCreating(ModelBuilder modelBuilder, DbContext con }); }); + modelBuilder.Entity(b => + { + b.Property(x => x.Id).ValueGeneratedNever(); + + b.ComplexProperty( + x => x.Deep, db => + { + db.ToJson(); + db.ComplexProperty( + d => d.Mid, mb => + mb.ComplexCollection( + m => m.Items, ib => + { + ib.ComplexCollection(i => i.Inner); + ib.ComplexCollection(i => i.Others); + })); + }); + }); + } + protected override Task SeedAsync(DbContext context) { var company = new CompanyWithComplexCollections @@ -716,6 +815,28 @@ protected override Task SeedAsync(DbContext context) }; context.Add(company); + + var widget = new WidgetWithDeepJson + { + Id = 1, + Deep = new DeepData + { + Mid = new MiddleData + { + Items = + [ + new DeepItem + { + Title = "Item1", + Inner = [new InnerEntry { Value = "inner-0" }], + Others = [] + } + ] + } + } + }; + + context.Add(widget); return context.SaveChangesAsync(); } } diff --git a/test/EFCore.Sqlite.FunctionalTests/Update/ComplexCollectionJsonUpdateSqliteTest.cs b/test/EFCore.Sqlite.FunctionalTests/Update/ComplexCollectionJsonUpdateSqliteTest.cs index 0c4bcd5f64f..7d524fb0fa7 100644 --- a/test/EFCore.Sqlite.FunctionalTests/Update/ComplexCollectionJsonUpdateSqliteTest.cs +++ b/test/EFCore.Sqlite.FunctionalTests/Update/ComplexCollectionJsonUpdateSqliteTest.cs @@ -290,6 +290,21 @@ public override async Task Replace_complex_property_mapped_to_json() """); } + public override async Task Grow_nested_sub_collection_in_complex_property_mapped_to_json() + { + await base.Grow_nested_sub_collection_in_complex_property_mapped_to_json(); + + AssertSql( + """ +@p0='{"Mid":{"Items":[{"Title":"Item1","Inner":[{"Value":"inner-0"},{"Value":"inner-1"}],"Others":[]}]}}' (Nullable = false) (Size = 99) +@p1='1' + +UPDATE "Widgets" SET "Deep" = @p0 +WHERE "Id" = @p1 +RETURNING 1; +"""); + } + public class ComplexCollectionJsonUpdateSqliteFixture : ComplexCollectionJsonUpdateFixtureBase { protected override ITestStoreFactory TestStoreFactory From da62a20e186a8fe1f41955ded97a48c67ce2ea3a Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Mon, 15 Jun 2026 12:31:50 -0700 Subject: [PATCH 4/5] Remove quirk --- src/EFCore/ChangeTracking/Internal/InternalEntryBase.cs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/EFCore/ChangeTracking/Internal/InternalEntryBase.cs b/src/EFCore/ChangeTracking/Internal/InternalEntryBase.cs index f8a9bb926c7..14ea31cf96d 100644 --- a/src/EFCore/ChangeTracking/Internal/InternalEntryBase.cs +++ b/src/EFCore/ChangeTracking/Internal/InternalEntryBase.cs @@ -644,8 +644,7 @@ public void SetPropertyModified( // Modified/Unchanged is incorrect and would fail the original ordinal validation. Leave their // state (computed by change detection) untouched, mirroring the bulk state-change logic in // InternalComplexCollectionEntry.SetState. - if (!UseOldBehavior38299 - && complexEntry.EntityState is EntityState.Added) + if (complexEntry.EntityState is EntityState.Added) { continue; } From 96925ba507092430f054e510068e39fe5efc4545 Mon Sep 17 00:00:00 2001 From: Andriy Svyryd Date: Mon, 15 Jun 2026 14:31:30 -0700 Subject: [PATCH 5/5] Change ConditionalFact to Fact --- .../Update/ComplexCollectionJsonUpdateTestBase.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/EFCore.Relational.Specification.Tests/Update/ComplexCollectionJsonUpdateTestBase.cs b/test/EFCore.Relational.Specification.Tests/Update/ComplexCollectionJsonUpdateTestBase.cs index 2649de6f345..6f8bcc48ec4 100644 --- a/test/EFCore.Relational.Specification.Tests/Update/ComplexCollectionJsonUpdateTestBase.cs +++ b/test/EFCore.Relational.Specification.Tests/Update/ComplexCollectionJsonUpdateTestBase.cs @@ -592,7 +592,7 @@ public virtual Task Replace_complex_property_mapped_to_json() } }); - [ConditionalFact] + [Fact] public virtual Task Grow_nested_sub_collection_in_complex_property_mapped_to_json() => TestHelpers.ExecuteWithStrategyInTransactionAsync( CreateContext,