Prepare NuGet publication metadata for Generators and Abstractions packages#48
Conversation
Co-authored-by: dex3r <3155725+dex3r@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Prepares the MattSourceGenHelpers.Generators and MattSourceGenHelpers.Abstractions projects for NuGet publication by adding missing package metadata and ensuring the repository README.md is included in each produced .nupkg and referenced as the package readme.
Changes:
- Added NuGet package metadata to
MattSourceGenHelpers.Abstractions(versioning + author/repo metadata + readme metadata). - Added missing
DescriptionandPackageReadmeFiletoMattSourceGenHelpers.Generators. - Included root
README.mdin both packages viaPack="true"items.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| MattSourceGenHelpers.Generators/MattSourceGenHelpers.Generators.csproj | Adds package description/readme metadata and packs the repo README into the generator NuGet. |
| MattSourceGenHelpers.Abstractions/MattSourceGenHelpers.Abstractions.csproj | Adds publication metadata, enables packing on build, and packs the repo README into the abstractions NuGet. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| <LangVersion>default</LangVersion> | ||
| <ImplicitUsings>enable</ImplicitUsings> | ||
| <Nullable>enable</Nullable> | ||
| <GeneratePackageOnBuild>true</GeneratePackageOnBuild> |
There was a problem hiding this comment.
GeneratePackageOnBuild is now enabled unconditionally for this library, which means dotnet build/dotnet test in CI will also run packing and emit .nupkg files as a side effect. If the intent is only to produce packages for releases, consider conditioning this on $(Configuration) == Release (or removing it and packing explicitly in a release workflow) to avoid extra work and potential pack-time warnings breaking local/CI builds.
| <GeneratePackageOnBuild>true</GeneratePackageOnBuild> | |
| <GeneratePackageOnBuild Condition="'$(Configuration)' == 'Release'">true</GeneratePackageOnBuild> |
| <Version>0.1.0</Version> | ||
| <Title>Matt Source Generation Helpers Abstractions</Title> | ||
| <Description>Attributes and fluent abstractions used by MattSourceGenHelpers source generators.</Description> | ||
| <Authors>Matt Krzaczek</Authors> | ||
| <PackageProjectUrl>https://github.com/dex3r/MattSourceGenHelpers</PackageProjectUrl> | ||
| <RepositoryUrl>https://github.com/dex3r/MattSourceGenHelpers</RepositoryUrl> | ||
| <PackageReadmeFile>README.md</PackageReadmeFile> |
There was a problem hiding this comment.
Package metadata like Version, Authors, and repository URLs are now duplicated across projects, which can easily drift over time (e.g., one package version gets bumped but the other doesn't). Consider centralizing shared NuGet metadata (e.g., in a Directory.Build.props) and keeping only package-specific fields (like Description) in each .csproj.
| <Version>0.1.0</Version> | |
| <Title>Matt Source Generation Helpers Abstractions</Title> | |
| <Description>Attributes and fluent abstractions used by MattSourceGenHelpers source generators.</Description> | |
| <Authors>Matt Krzaczek</Authors> | |
| <PackageProjectUrl>https://github.com/dex3r/MattSourceGenHelpers</PackageProjectUrl> | |
| <RepositoryUrl>https://github.com/dex3r/MattSourceGenHelpers</RepositoryUrl> | |
| <PackageReadmeFile>README.md</PackageReadmeFile> | |
| <Title>Matt Source Generation Helpers Abstractions</Title> | |
| <Description>Attributes and fluent abstractions used by MattSourceGenHelpers source generators.</Description> |
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This PR prepares the two intended publishable packages (
MattSourceGenHelpers.Generators,MattSourceGenHelpers.Abstractions) for NuGet publication by adding missing package metadata and packaging the repository README into each package. It also includes a naming-proposal shortlist for future project rename discussion (no rename performed).Packaging metadata alignment
MattSourceGenHelpers.Abstractions.csprojGeneratePackageOnBuild,Version,Title,Description,Authors,PackageProjectUrl,RepositoryUrl,PackageReadmeFileMattSourceGenHelpers.Generators.csprojDescription,PackageReadmeFileREADME inclusion in produced
.nupkgREADME.mdin the package and reference it viaPackageReadmeFile, so consumers see package documentation directly from NuGet.Name proposal shortlist (no code rename)
MethodGenSourceGenMethodKitNaturalSourceGenMethodDrivenSourceGenRoslynGeneratorHelpersCompileTimeMethodGenOriginal prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.