-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Closed
Milestone
Description
SDK permits specifying TargetingPackVersion metdata on FrameworkReference:
sdk/src/Tasks/Microsoft.NET.Build.Tasks/ResolveFrameworkReferences.cs
Lines 99 to 103 in 7d6b26d
| if (frameworkReference != null) | |
| { | |
| // Allow targeting pack version to be overridden via metadata on FrameworkReference | |
| targetingPackVersion = frameworkReference.GetMetadata("TargetingPackVersion"); | |
| } |
But then it constructs the path to the targeting pack based on KnownFrameworkReference:
sdk/src/Tasks/Microsoft.NET.Build.Tasks/ResolveFrameworkReferences.cs
Lines 112 to 122 in 7d6b26d
| string targetingPackPath = null; | |
| if (!string.IsNullOrEmpty(TargetingPackRoot)) | |
| { | |
| targetingPackPath = Path.Combine(TargetingPackRoot, knownFrameworkReference.TargetingPackName, knownFrameworkReference.TargetingPackVersion); | |
| } | |
| if (targetingPackPath != null && Directory.Exists(targetingPackPath)) | |
| { | |
| // Use targeting pack from packs folder | |
| targetingPack.SetMetadata(MetadataKeys.PackageDirectory, targetingPackPath); | |
| targetingPack.SetMetadata(MetadataKeys.Path, targetingPackPath); | |
| } |
Also, is this really the way we should be specifying which framework to build against? I had expected RuntimeFrameworkVersion to work, but it looks like that only controls the runtime and not ref-pack.
/cc @dsplaisted
Metadata
Metadata
Assignees
Labels
No labels