You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the way Microsoft.Common.CrossTargeting.targets finds the target to implement is through a property (CoreCrossTargetingTargetsPath) which is set in the SDK.props file to point to a file which contains the Build target that loops over TFMs. However, restore3 now generates a TFM specific props file. That is, the generated Consoleapp.nuget.g.props file looks like this:
When this is imported in the outer build, TargetFramework is not set and so the props don’t get imported which means CoreCrossTargetingTargetsPath is not set. So in Microsoft.Common.CrossTargeting.targets, nothing gets imported. @nick and I’ve discussed an approach before which, if present, could solve this problem. Essentially, if we have a convention for a place for cross-targeting props & targets similar to the current convention for TFMs (say a folder called build\cross) then restore could generate a section in the props\targets specific to the outer build.
Targets and prop files named with the package id and put into nupkg/buildCrossTargeting will be imported into the cross targeting area above target framework specific targets.
FixesNuGet/Home#3496
Quoting @srivatsn:
The text was updated successfully, but these errors were encountered: