Commit 3af5ec0
Add extra parameter to get nearest (#12932)
Fixes #
### Context
Design: NuGet/Home#12124
To allow duplicate frameworks in aliasing, the project reference
protocol nearest framework selection needs to be updated to support
matching by alias as well.
Relevant part:
https://github.com/NuGet/Home/blob/dev-nkolev92-tfmaliases/accepted/2025/Multiple-Equivalent-Framework-Support-TFM-As-Aliases.md#project-to-project-references
NuGet/NuGet.Client#7011 NuGet.Client side
adding the parameter.
NuGet/NuGet.Client#6972 will add the full
implementation at a later point.
### Changes Made
- Pass CurrentProjectTargetFrameworkProperty if
GetReferenceNearestTargetFrameworkTaskSupportsTargetFrameworKPropertyParameter
is set.
- If
GetReferenceNearestTargetFrameworkTaskSupportsTargetFrameworKPropertyParameter
is not set, but
GetReferenceNearestTargetFrameworkTaskSupportsTargetPlatformParameter is
set, call the old variation.
- Otherwise calls the last variation.
### Testing
- Manual testing.
- I'd be happy to add tests if someone can point me in the right
direction.
### Notes
The idea here is to get ahead of things. Currently aliasing work can't
be end to end tested because it requires an msbuild change. It makes it
really hard to validate the NuGet changes are enough and good, but this
is the only change needed on the msbuild side.
---------
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>1 parent 9263fe6 commit 3af5ec0
File tree
2 files changed
+17
-3
lines changed- documentation
- src/Tasks
2 files changed
+17
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1883 | 1883 | | |
1884 | 1884 | | |
1885 | 1885 | | |
1886 | | - | |
| 1886 | + | |
1887 | 1887 | | |
1888 | 1888 | | |
1889 | 1889 | | |
1890 | 1890 | | |
1891 | 1891 | | |
| 1892 | + | |
1892 | 1893 | | |
1893 | 1894 | | |
1894 | 1895 | | |
1895 | | - | |
| 1896 | + | |
| 1897 | + | |
| 1898 | + | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
| 1907 | + | |
| 1908 | + | |
| 1909 | + | |
1896 | 1910 | | |
1897 | 1911 | | |
1898 | 1912 | | |
| |||
0 commit comments