Commit f64dd7b
committed
[NET8] Fix assembly count when satellite assemblies are present
Context: #8790
The old method of satellite assembly counting relied on the
`RelativePath` MSBuild item metadata, which appears to have gone
missing somewhere in .NET8+. Update the code to check for presence
of the following metadata, in order given, to determine assembly's
culture, if any:
* `Culture`
* `RelativePath`
* `DestinationSubDirectory`
Failure to count satellite assemblies can, and sometimes will,
result in a segfault since we generate a number of native code
arrays based on the assembly count and the runtime assumes that
what the build told it is true.1 parent 5c04944 commit f64dd7b
2 files changed
Lines changed: 42 additions & 3 deletions
File tree
- src/Xamarin.Android.Build.Tasks
- Tasks
- Utilities
Lines changed: 10 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
262 | 262 | | |
263 | 263 | | |
264 | 264 | | |
265 | | - | |
266 | | - | |
267 | | - | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
268 | 275 | | |
269 | 276 | | |
270 | 277 | | |
| |||
Lines changed: 32 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
643 | 643 | | |
644 | 644 | | |
645 | 645 | | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
| 649 | + | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
| 655 | + | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
646 | 678 | | |
647 | 679 | | |
0 commit comments