Repository navigation
[release/10.0] Add managed FileCatalog MSBuild task - #17133
Merged
akoeplinger merged 4 commits intoJul 17, 2026
Merged
Conversation
Co-authored-by: Copilot <[email protected]> (cherry picked from commit 3169db0)
Target $(NetToolCurrent);$(NetFrameworkToolCurrent) so the task loads under both Core and desktop MSBuild (matching other Arcade build tasks), adding the out-of-band System.Formats.Asn1 reference for net472 and a cross-framework hash helper in place of the net5.0+ SHA*.HashData APIs. Test project multitargets to exercise the net472 path, with net472-compatible hex/hash helpers, and uses FluentAssertions / $(NetToolCurrent) conventions from this branch. Co-authored-by: Copilot <[email protected]> Copilot-Session: d4e0f156-2249-4165-96fb-c348b532a48b
Contributor
There was a problem hiding this comment.
Pull request overview
Adds a new managed MSBuild task/package to generate unsigned Windows catalog (.cat) files in a deterministic, cross-platform way (removing the makecat.exe/Windows SDK dependency), along with unit tests and solution wiring.
Changes:
- Introduces
Microsoft.DotNet.Build.Tasks.FileCatalogwithGenerateFileCatalogtask and supporting catalog-building implementation. - Adds a golden/byte-for-byte test suite validating parity with
makecat.exeoutput and task behavior. - Wires the new projects into
Arcade.slnxand packages the task via abuild/*.propsauto-import.
Reviewed changes
Copilot reviewed 11 out of 11 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| src/Microsoft.DotNet.Build.Tasks.FileCatalog/README.md | Documents purpose and usage of the new task/package. |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog/Microsoft.DotNet.Build.Tasks.FileCatalog.csproj | New build-task project configuration and packaging metadata. |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog/GenerateFileCatalog.cs | MSBuild task entrypoint for generating catalogs from item inputs. |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog/CatalogOids.cs | OID constants used when encoding catalog ASN.1. |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog/CatalogMemberEncoder.cs | ASN.1 DER encoding for per-member catalog structures. |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog/CatalogEntry.cs | Represents catalog entries (hash computation/storage). |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog/CatalogBuilder.cs | Builds deterministic unsigned PKCS#7/CTL catalog bytes. |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog/build/Microsoft.DotNet.Build.Tasks.FileCatalog.props | Auto-imports UsingTask for consuming projects. |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog.Tests/Microsoft.DotNet.Build.Tasks.FileCatalog.Tests.csproj | New unit test project for the catalog builder/task. |
| src/Microsoft.DotNet.Build.Tasks.FileCatalog.Tests/CatalogTests.cs | Golden fixtures + behavioral tests for determinism and task output. |
| Arcade.slnx | Adds the new project + tests to the solution. |
ViktorHofer
approved these changes
Jul 17, 2026
Switch the list-identifier derivation from the legacy HashAlgorithm TransformBlock streaming API to IncrementalHash, matching the rest of the FileCatalog code (CatalogEntry.FromFile and the net472 hash fallback). Output is byte-for-byte identical (same SHA-256 over the same concatenation), as verified by the catalog fixture tests. Co-authored-by: Copilot <[email protected]> Copilot-Session: d4e0f156-2249-4165-96fb-c348b532a48b
akoeplinger
force-pushed
the
dev/akoeplinger/backport-filecatalog-10.0
branch
from
July 17, 2026 08:26
b495bda to
5b557d6
Compare
Replace the manual byte-by-byte comparison loop with the built-in allocation-free ReadOnlySpan<byte>.SequenceCompareTo, which yields the same lexicographic ordering used for sorting and dedup. Available on both net472 (via System.Memory) and modern .NET. Co-authored-by: Copilot <[email protected]> Copilot-Session: d4e0f156-2249-4165-96fb-c348b532a48b
ViktorHofer
approved these changes
Jul 17, 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.
Backport of #17098. Adapted to the requirements of release/10.0