You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ProjectExtensions already has typed accessors for the well-known properties a build actually reaches for — GetTargetFrameworks(), GetRuntimeIdentifiers(), GetOutputType(), HasPackageReference(). Package metadata has none, so every consumer that needs PackageId hand-writes the property name: no compile-time check, no discoverability, and a typo returns null rather than failing.
Raised in review on #581 ("probably deserves a standalone property, but that's a job for another day").
Outcome
Reading a project's package id is a first-class API on Project, in the same shape as the accessors next to it. build/Build.cs stops naming an MSBuild property in a string.
Acceptance criteria
ProjectExtensions exposes a typed PackageId accessor, following the existing Project.Misc.cs conventions.
Resolution matches MSBuild: an explicit <PackageId> wins, otherwise it falls back to AssemblyName/MSBuildProjectName — a project without an explicit <PackageId> still returns the id it would actually pack as.
build/Build.cs's Install target uses the accessor instead of GetProperty("PackageId").
Specs in tests/Fallout.ProjectModel.Specs cover both cases — a project with an explicit <PackageId> (Fallout.Cli → Fallout.GlobalTool) and one relying on the fallback.
Additive only. GetProperty stays as the escape hatch for arbitrary properties.
Notes
Related to #584 (centralising Fallout's own configuration) but distinct: #584 is about where our values live, this is a gap in the public Fallout.ProjectModel surface that any consumer build hits.
Activity