Commit 14aca2c
authored
fix(build): unblock 1.39.0 Release packages build (NETSDK1047 in JsonRpc source generator) (#12341)
fix(build): keep RPC JSON source generator portable in self-contained RID publish
scripts/build/build.sh publishes with -r <rid> --sc; those CLI global
properties (RuntimeIdentifier, SelfContained, PublishSingleFile,
IncludeAllContentForSelfExtract) leak into the RID-less
Nethermind.JsonRpc.SourceGenerator[.Build] tool builds, which then fail
with NETSDK1047 (no net10.0/<rid> target in project.assets.json).
First hit on the 1.39.0 Release run: the packages path had not executed
since #11697 introduced the generator (1.38.1 predates it). The Docker
image path is unaffected because it publishes framework-dependent
without -r.
Fix: strip those properties from the generator ProjectReferences
(UndefineProperties + GlobalPropertiesToRemove) and from the inner
<MSBuild> invocations (RemoveProperties) so the tool always builds and
runs as a portable framework-dependent app - required anyway for the
cross-RID legs (win/osx) where the generator must execute on the Linux
build host.
Verified in the CI SDK container (10.0.301-resolute): pristine tree
reproduces NETSDK1047 on 'publish -r linux-x64 --sc'; patched tree
publishes successfully and the produced binary runs.1 parent 9eff0d2 commit 14aca2c
1 file changed
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | | - | |
| 20 | + | |
| 21 | + | |
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
| |||
42 | 42 | | |
43 | 43 | | |
44 | 44 | | |
| 45 | + | |
45 | 46 | | |
46 | 47 | | |
47 | 48 | | |
48 | 49 | | |
49 | 50 | | |
50 | 51 | | |
51 | 52 | | |
| 53 | + | |
52 | 54 | | |
53 | 55 | | |
54 | 56 | | |
| |||
0 commit comments