Avoid passing TargetFramework as a global property when packing for projects that aren't multi-targeted #12323
Labels
Functionality:Pack
Partner:DotNet
Product:dotnet.exe
Triage:NeedsMoreInfo
Type:DCR
Design Change Request
In dotnet/designs#281, we are proposing that the TargetFramework will be included in the output path if it was set as a global property or if the project was multi-targeted. Otherwise, it will not be part of the output path.
This causes an issue when doing a NuGet pack command, as the
_WalkEachTargetPerFramework
target runs the_GetBuildOutputFilesWithTfm
target for eachTargetFramework
. This means in this inner build theTargetFramework
will be a global property, even if there is only one.To fix this, the NuGet pack logic would need to change so that if there is only one target framework, it does not pass the
TargetFramework
global property in this case.The text was updated successfully, but these errors were encountered: