Organize and document complex PackageReference options in csproj files#19
Merged
Malcolmnixon merged 3 commits intomainfrom Feb 28, 2026
Merged
Organize and document complex PackageReference options in csproj files#19Malcolmnixon merged 3 commits intomainfrom
Malcolmnixon merged 3 commits intomainfrom
Conversation
…ool packages Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Review csproi PackageReference options and add comments
Add explanatory comments for complex PackageReference options in csproj files
Feb 28, 2026
Malcolmnixon
requested changes
Feb 28, 2026
Co-authored-by: Malcolmnixon <1863707+Malcolmnixon@users.noreply.github.com>
Copilot
AI
changed the title
Add explanatory comments for complex PackageReference options in csproj files
Organize and document complex PackageReference options in csproj files
Feb 28, 2026
Malcolmnixon
approved these changes
Feb 28, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The
PackageReferenceentries in both csproj files used child-element form (<PrivateAssets>+<IncludeAssets>) without any explanation, and all package references were mixed together in a singleItemGroup, making the intent unclear.Description
ItemGroupinto two labelled sections:<!-- Build Tool Dependencies -->—Microsoft.Sbom.Targets,Polyfill,Microsoft.SourceLink.GitHub(simplePrivateAssets="All"attribute form)<!-- Code Analysis Dependencies -->—Microsoft.CodeAnalysis.NetAnalyzersandSonarAnalyzer.CSharpwith an explanatory comment on why the child-element form is usedMicrosoft.CodeAnalysis.NetAnalyzers,SonarAnalyzer.CSharp) explaining:PrivateAssets="all"— keeps these build-time analyzers out of the published package's transitive dependency graphIncludeAssetswith explicit asset list — ensuresanalyzersandbuildtransitiveasset types are activated so Roslyn analyzers and MSBuild targets run during the buildcoverlet.collector, noting thatbuild/buildtransitiveassets are required for the data collector MSBuild targets to hook into test runsType of Change
Pre-Submission Checklist
Before submitting this pull request, ensure you have completed the following:
Build and Test
dotnet build --configuration Releasedotnet test --configuration ReleaseCode Quality
dotnet format --verify-no-changesQuality Checks
Please run the following checks before submitting:
cspell "**/*.{md,cs}"markdownlint "**/*.md"yamllint .Testing
Documentation
Additional Notes
The grouping style for the library csproj now matches the labelled-
ItemGrouppattern already used in the test csproj. The three packages using single-linePrivateAssets="All"attribute syntax (Microsoft.Sbom.Targets,Polyfill,Microsoft.SourceLink.GitHub) are self-explanatory and grouped underBuild Tool Dependencies.✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.