diff --git a/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs b/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs index 90bd96b13af..984fee0faa3 100644 --- a/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs +++ b/src/Microsoft.DotNet.SharedFramework.Sdk/src/CreateFrameworkListFile.cs @@ -88,12 +88,13 @@ public override bool Execute() FileVersion = FileUtilities.GetFileVersion(item.ItemSpec), IsNative = item.GetMetadata("IsNative") == "true", IsSymbolFile = item.GetMetadata("IsSymbolFile") == "true", + IsPgoData = item.GetMetadata("IsPgoData") == "true", IsResourceFile = item.ItemSpec .EndsWith(".resources.dll", StringComparison.OrdinalIgnoreCase) }) .Where(f => !f.IsSymbolFile && - (f.Filename.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || f.IsNative)) + (f.Filename.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) || f.IsNative || f.IsPgoData)) // Remove duplicate files this task is given. .GroupBy(f => f.Item.ItemSpec) .Select(g => g.First()) @@ -111,6 +112,10 @@ public override bool Execute() { type = "Resources"; } + else if (f.IsPgoData) + { + type = "PgoData"; + } string path = Path.Combine(f.TargetPath, f.Filename).Replace('\\', '/'); @@ -137,7 +142,12 @@ public override bool Execute() new XAttribute("Culture", Path.GetFileName(Path.GetDirectoryName(path)))); } - if (f.AssemblyName != null) + if (f.IsPgoData) + { + // Pgo data is never carried with single file images + element.Add(new XAttribute("DropFromSingleFile", "true")); + } + else if (f.AssemblyName != null) { byte[] publicKeyToken = f.AssemblyName.GetPublicKeyToken(); string publicKeyTokenHex; diff --git a/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets b/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets index 860db8a71ff..ed8fe84415b 100644 --- a/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets +++ b/src/Microsoft.DotNet.SharedFramework.Sdk/targets/sharedfx.targets @@ -130,6 +130,10 @@ true + + true + PgoData + @@ -380,6 +384,7 @@ <_FrameworkListRootAttribute Include="FrameworkName" Value="$(SharedFrameworkName)" /> <_FrameworkListRootAttribute Include="Name" Value="$(SharedFrameworkFriendlyName)" /> <_FrameworkListTargetFilePrefix Include="ref/;runtimes/" /> + <_FrameworkListTargetFilePrefix Condition="'$(PlatformPackageType)' == 'RuntimePack'" Include="PgoData" />