Comment for not-imported package build logic #8445
Labels
Area:Logging
Functionality:Restore
help wanted
Considered good issues for community contributions.
Priority:2
Issues for the current backlog.
Style:PackageReference
Type:DCR
Design Change Request
Milestone
I just had a bad time trying to figure out why a package I referenced wasn't working for one of the
TargetFramework
s in the project. It turned out that this was because we (accidentally) referenced the package only for one of the TFs in the project.NuGet (correctly!) generated MSBuild logic to import the
build/
folder from the package for the affected TF and for the outer build, but not for the other TF in the project.It would have been nice if there had been a breadcrumb in the generated build logic that said something like
<!-- Package Whatever is not referenced in TargetFramework X -->
Details about Problem
NuGet product used (NuGet.exe | VS UI | Package Manager Console | dotnet.exe): dotnet CLI primarily
NuGet version (x.x.x.xxx): 5.3.0.0
dotnet.exe --version (if appropriate):
3.0.100-preview9-013744
VS version (if appropriate): 16.3 previews
OS version (i.e. win10 v1607 (14393.321)): all
Worked before? If so, with which NuGet version: no
Detailed repro steps so we can see the same problem
Have a conditional package reference, like
Restore. The generated .props file looks like
I'd love to see an additional comment for each import that could have been emitted but wasn't because the reference was not valid for that TF.
Sample Project
8845.zip
The text was updated successfully, but these errors were encountered: