Skip to content

Stop EF Design and build-only pins leaking into consumer apps - #451

Merged
Tim-Maes merged 1 commit into
masterfrom
fix/efcore-package-dependencies
Oct 30, 2026
Merged

Tim-Maes merged 1 commit into
masterfrom
fix/efcore-package-dependencies

Conversation

@Tim-Maes

Copy link
Copy Markdown
Owner

Facet.Extensions.EFCore listed Microsoft.EntityFrameworkCore.Design as a package dependency (developmentDependency only applies to direct installs), so every app shipped it with its Roslyn/MSBuild closure. It is now PrivateAssets="all"; the Design/ types are only loaded by 'dotnet ef', which already requires the app to reference EFCore.Design. A minimal net8 app's output drops from 56 files / 29 MB to 19 files / 3.4 MB.

The System.Collections.Immutable 10.x pins existed because Facet.Extensions compiled against the generator assembly, pulling in Roslyn's SCI; they then leaked to net8/net9 consumers of four packages. The generator project is now routed into an unconsumed item type, keeping the Facet package dependency without compiling against it, so the pins and the repo-wide MSB3277 suppression are gone (a narrow net8 suppression remains in Facet.Extensions.EFCore for EFCore.Design 8's Roslyn 4.5).

The System.Security.Cryptography.Xml override is private as well, and bumped to 10.0.14: 10.0.12 and its Pkcs dependency now have high-severity advisories, and were shipped to every EFCore/EFCore.Mapping consumer.

Facet.Extensions.EFCore listed Microsoft.EntityFrameworkCore.Design as a
package dependency (developmentDependency only applies to direct installs),
so every app shipped it with its Roslyn/MSBuild closure. It is now
PrivateAssets="all"; the Design/ types are only loaded by 'dotnet ef', which
already requires the app to reference EFCore.Design. A minimal net8 app's
output drops from 56 files / 29 MB to 19 files / 3.4 MB.

The System.Collections.Immutable 10.x pins existed because Facet.Extensions
compiled against the generator assembly, pulling in Roslyn's SCI; they then
leaked to net8/net9 consumers of four packages. The generator project is now
routed into an unconsumed item type, keeping the Facet package dependency
without compiling against it, so the pins and the repo-wide MSB3277
suppression are gone (a narrow net8 suppression remains in
Facet.Extensions.EFCore for EFCore.Design 8's Roslyn 4.5).

The System.Security.Cryptography.Xml override is private as well, and
bumped to 10.0.14: 10.0.12 and its Pkcs dependency now have high-severity
advisories, and were shipped to every EFCore/EFCore.Mapping consumer.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant