Commit 36042e0
committed
Make NuGetizer targets buildTransitive to fix SponsorLink
For development-dependency packages, no assets flow across project
references, including build targets and package dependencies.
This is problematic for SponsorLink since it needs targets to properly
surface build properties to the analyzer that performs the checks.
By making NuGetizer build targets transitive, we fix the project to
project (P2P) scenario where one project installs NuGetizer and
referencing projects start failing the SponsorLink check because the
SL targets are missing. (since the package dependency on SL isn't
surfaced in that case).
By also including the SL targets in our package and conditionally
importing them if they haven't already been imported, we further
remove the changes that the missing dependency causes failures.
This might not be the optimal way to solve this, but it's the only
one that works consistently. This obviously causes P2P references
to a project consuming NuGetizer to *also* become nugetized
themselves. This should be a minor issue, however.1 parent a77c3e1 commit 36042e0
File tree
3 files changed
+15
-5
lines changed- src
- CodeAnalysis
- NuGetizer.Tasks
3 files changed
+15
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
| 17 | + | |
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
22 | 25 | | |
23 | 26 | | |
24 | 27 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
18 | 18 | | |
19 | 19 | | |
20 | 20 | | |
21 | | - | |
22 | | - | |
23 | 21 | | |
24 | 22 | | |
25 | 23 | | |
| |||
29 | 27 | | |
30 | 28 | | |
31 | 29 | | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
32 | 39 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
19 | 19 | | |
20 | 20 | | |
21 | 21 | | |
22 | | - | |
| 22 | + | |
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
| |||
0 commit comments