Commit fdef5bb
Fix NTVS insertion SignCheck: resolve makecat.exe from the Windows SDK (#2556)
* Fix content catalog signing: resolve makecat.exe from Windows SDK
The GenerateContentCatalog target invoked a bare `makecat.exe`, which is not
on PATH on the official build agents. It failed with exit code 9009 and, because
the Exec used IgnoreExitCode=true, the .cat was silently never produced, signed,
or bundled into the VSIX. Insertions therefore shipped 33 unsigned .js/.xml
template files and were rejected by the VS insertion SignCheck.
Resolve makecat.exe explicitly from the Windows 10 SDK (ToolLocationHelper with
a registry fallback) and fail the build loudly if the catalog cannot be produced,
so an unsigned payload can never ship silently again.
Bug: 2982241
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2f944511-9280-4ed2-aa0c-045bd63b66f2
* Exclude zero-byte files from content catalog
makecat.exe cannot hash a 0-byte file: it aborts with 'NOT processed:
calculating the indirect data' / 'Errors found in parsing the CDF file'
and produces no catalog. EmptyJs.js is a 0-byte placeholder template, so
it broke catalog generation once the makecat.exe exit code was no longer
ignored. Filter zero-byte files out of the catalog source list via a
RoslynCodeTaskFactory inline task before writing the CDF.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2f944511-9280-4ed2-aa0c-045bd63b66f2
* Fix catalog source paths and VSIX embedding hook
Two bugs prevented the content catalog from actually protecting the
template files, so the build went green while still shipping 32 unsigned
.js/.xml files:
1. _CatalogSourceDir used '..\Nodejs\...' / '..\..\Extras' /
'..\TestAdapter\...', which resolve one level too high from
Nodejs\Product\ and do not exist, so zero files were collected and
makecat never ran (guarded on count > 0).
2. IncludeCatalogInVsix hooked BeforeTargets=CreateVsixContainer, but
CreateVsixContainer depends on GetVsixSourceItems, which had already
enumerated the package contents - so the signed .cat was never added
to the VSIX. Hook BeforeTargets=GetVsixSourceItems instead.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2f944511-9280-4ed2-aa0c-045bd63b66f2
* Give each catalog member a unique tag to prevent hash drop-out
makecat keeps only one entry per member name, so template files that share
a basename across directories (the five UnitTest.js item templates and the
six roletemplatedata.xml cloud-role templates) collided under a single
'<hash>UnitTest.js' / '<hash>roletemplatedata.xml' tag - only the first
was cataloged and the other 9 shipped unsigned. Assign a unique CatTag
(index_filename) per file in the CDF. Verified locally: NodejsToolsVsix
26/26 and TestAdapterVsix 12/12 non-empty js/xml now covered.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2f944511-9280-4ed2-aa0c-045bd63b66f2
* Make EmptyJs.js template non-empty so it can be catalog-signed
The 0-byte EmptyJs.js template cannot be hashed by makecat, leaving it
uncovered by the content catalog and flagged by the VS Insertion Sign
Check. Add a minimal newline so all 33 shipped template files are
catalog-signed.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 2f944511-9280-4ed2-aa0c-045bd63b66f2
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 3f6316b commit fdef5bb
2 files changed
Lines changed: 82 additions & 15 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
3 | 42 | | |
4 | 43 | | |
5 | 44 | | |
| |||
29 | 68 | | |
30 | 69 | | |
31 | 70 | | |
32 | | - | |
| 71 | + | |
33 | 72 | | |
34 | 73 | | |
35 | | - | |
| 74 | + | |
36 | 75 | | |
37 | 76 | | |
38 | 77 | | |
39 | | - | |
40 | | - | |
41 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
42 | 81 | | |
43 | 82 | | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
44 | 88 | | |
45 | 89 | | |
46 | 90 | | |
| |||
49 | 93 | | |
50 | 94 | | |
51 | 95 | | |
52 | | - | |
| 96 | + | |
53 | 97 | | |
54 | 98 | | |
55 | | - | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
56 | 120 | | |
57 | | - | |
58 | | - | |
59 | | - | |
60 | | - | |
| 121 | + | |
61 | 122 | | |
62 | | - | |
63 | | - | |
| 123 | + | |
| 124 | + | |
64 | 125 | | |
65 | 126 | | |
66 | 127 | | |
| |||
72 | 133 | | |
73 | 134 | | |
74 | 135 | | |
75 | | - | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
76 | 142 | | |
77 | 143 | | |
78 | | - | |
| 144 | + | |
79 | 145 | | |
80 | 146 | | |
81 | 147 | | |
| |||
0 commit comments