Skip to content

[release/11.0-preview7] Source code updates from dotnet/dotnet - #38703

Merged
wtgodbe merged 9 commits into
release/11.0-preview7from
darc-release/11.0-preview7-a65431c6-49bf-4887-bb80-a68ad8542e10
Jul 29, 2026
Merged

[release/11.0-preview7] Source code updates from dotnet/dotnet#38703
wtgodbe merged 9 commits into
release/11.0-preview7from
darc-release/11.0-preview7-a65431c6-49bf-4887-bb80-a68ad8542e10

Conversation

@dotnet-maestro

@dotnet-maestro dotnet-maestro Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Note

This is a codeflow update. It may contain both source code changes from
the VMR
as well as dependency updates. Learn more here.

This pull request brings the following source code changes

From https://github.com/dotnet/dotnet

Updated Dependencies

  • From 11.0.0-beta.26365.101 to 11.0.0-beta.26378.106
    • Microsoft.DotNet.Arcade.Sdk
    • Microsoft.DotNet.Build.Tasks.Templating
    • Microsoft.DotNet.Helix.Sdk
  • From 11.0.0-preview.7.26365.101 to 11.0.0-preview.7.26378.106
    • Microsoft.Extensions.Caching.Memory
    • Microsoft.Extensions.Configuration
    • Microsoft.Extensions.Configuration.EnvironmentVariables
    • Microsoft.Extensions.Configuration.Json
    • Microsoft.Extensions.DependencyInjection
    • Microsoft.Extensions.DependencyModel
    • Microsoft.Extensions.HostFactoryResolver.Sources
    • Microsoft.Extensions.Logging
    • Microsoft.NETCore.App.Ref
    • Microsoft.NETCore.Platforms
    • System.Formats.Asn1
    • System.Runtime.Caching
    • System.Text.Encodings.Web
    • System.Text.Json

Associated changes in source repos

Diff the source with this PR branch
darc vmr diff --name-only https://github.com/dotnet/dotnet:ab4a9a5f25db0b29e980a7acfab46bc4eca924c3..https://github.com/dotnet/efcore:darc-release/11.0-preview7-a65431c6-49bf-4887-bb80-a68ad8542e10

dotnet-maestro Bot added 2 commits July 27, 2026 17:42
Updated Dependencies:
Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk (Version 11.0.0-beta.26365.101 -> 11.0.0-beta.26376.106)
Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Logging, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Formats.Asn1, System.Runtime.Caching, System.Text.Encodings.Web, System.Text.Json (Version 11.0.0-preview.7.26365.101 -> 11.0.0-preview.7.26376.106)
[[ commit created by automation ]]
@dotnet-maestro
dotnet-maestro Bot requested review from a team, AndriySvyryd and wtgodbe as code owners July 27, 2026 17:42
Copilot AI and others added 2 commits July 27, 2026 20:39
Co-authored-by: wtgodbe <14283640+wtgodbe@users.noreply.github.com>
Co-authored-by: wtgodbe <14283640+wtgodbe@users.noreply.github.com>
Copilot AI requested a review from wtgodbe July 27, 2026 20:47
VerifyError(
CoreStrings.UnionTypeNotSupported(nameof(UnionEntity)),
modelBuilder);
Assert.Equal(

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This should be fixed in the product

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is it already fixed in main?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

No, main is still on preview5

dotnet-maestro Bot and others added 5 commits July 28, 2026 04:21
Updated Dependencies:
Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk (Version 11.0.0-beta.26376.106 -> 11.0.0-beta.26377.110)
Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Logging, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Formats.Asn1, System.Runtime.Caching, System.Text.Encodings.Web, System.Text.Json (Version 11.0.0-preview.7.26376.106 -> 11.0.0-preview.7.26377.110)
[[ commit created by automation ]]
Updated Dependencies:
Microsoft.DotNet.Arcade.Sdk, Microsoft.DotNet.Build.Tasks.Templating, Microsoft.DotNet.Helix.Sdk (Version 11.0.0-beta.26377.110 -> 11.0.0-beta.26378.106)
Microsoft.Extensions.Caching.Memory, Microsoft.Extensions.Configuration, Microsoft.Extensions.Configuration.EnvironmentVariables, Microsoft.Extensions.Configuration.Json, Microsoft.Extensions.DependencyInjection, Microsoft.Extensions.DependencyModel, Microsoft.Extensions.HostFactoryResolver.Sources, Microsoft.Extensions.Logging, Microsoft.NETCore.App.Ref, Microsoft.NETCore.Platforms, System.Formats.Asn1, System.Runtime.Caching, System.Text.Encodings.Web, System.Text.Json (Version 11.0.0-preview.7.26377.110 -> 11.0.0-preview.7.26378.106)
[[ commit created by automation ]]
The C# preview "union" language feature now compiles union declarations
(e.g. union UnionEntity(int);) as value types (structs implementing
System.Runtime.CompilerServices.IUnion), rather than reference types.

This broke the existing detection of union types mapped as entity or
complex types added in #38398:
- SharedTypeExtensions.IsValidEntityType required IsClass: true, so
  EntityType's constructor now threw a generic ArgumentException
  ("must be a non-interface reference type") as soon as a union type
  was added to the model, before ModelValidator ever got a chance to
  detect it and produce the specific UnionTypeNotSupported message.
- ConstructorBindingConvention (an IModelFinalizingConvention that runs
  during FinalizeModel, before ModelValidator.Validate) attempted to
  bind a constructor for union types used as complex properties,
  throwing "No suitable constructor was found" before the model
  validator's union check was reached.

Fix:
- IsValidEntityType now also accepts union types (mirroring
  IsValidComplexType, which already allowed them), so union entity
  types can still be added to the model and are rejected later, with
  the intended friendly error message, by ModelValidator.
- ConstructorBindingConvention now skips constructor binding for union
  entity/complex types, since they can never have a meaningful
  constructor binding, allowing model finalization to proceed to
  ModelValidator.Validate where the specific union error is thrown.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@wtgodbe
wtgodbe merged commit 0fe6f36 into release/11.0-preview7 Jul 29, 2026
20 of 21 checks passed
@wtgodbe
wtgodbe deleted the darc-release/11.0-preview7-a65431c6-49bf-4887-bb80-a68ad8542e10 branch July 29, 2026 00:04
@dotnet-milestone-bot dotnet-milestone-bot Bot added this to the 11.0-preview7 milestone Jul 29, 2026
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.

3 participants