Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
using Microsoft.Extensions.DependencyModel;
using NuGet.Common;
using NuGet.ProjectModel;
using NuGet.RuntimeModel;
using System;
using System.IO;
using System.Linq;
Expand All @@ -29,6 +30,8 @@ public partial class ProcessSharedFrameworkDeps : Task
[Required]
public string BuildTasksAssemblyPath { get; set; }

public string RuntimeIdentifierGraph { get; set; }

public override bool Execute()
{
EnsureInitialized(BuildTasksAssemblyPath);
Expand All @@ -53,7 +56,7 @@ private void ExecuteCore()
}

var manager = new RuntimeGraphManager();
var graph = manager.Collect(lockFile);
RuntimeGraph graph = string.IsNullOrEmpty(RuntimeIdentifierGraph) ? manager.Collect(lockFile) : JsonRuntimeFormat.ReadRuntimeGraph(RuntimeIdentifierGraph);
var expandedGraph = manager.Expand(graph, Runtime);

var trimmedRuntimeLibraries = context.RuntimeLibraries;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
DepsFilePath="$(SharedFrameworkDepsDestinationFile)"
PackagesToRemove="@(TrimPkgsFromDeps)"
Runtime="$(RuntimeGraphGeneratorRuntime)"
RuntimeIdentifierGraph="$(BundledRuntimeIdentifierGraphFile)"
BuildTasksAssemblyPath="$(PackagingTaskDir)Microsoft.DotNet.Build.Tasks.Packaging.dll" />
</Target>

Expand Down