in src/Tasks/Microsoft.NET.Build.Tasks/DependencyContextBuilder.cs [360:389]
private IEnumerable<RuntimeLibrary> GetRuntimePackLibraries(IEnumerable<RuntimePackAssetInfo> runtimePackAssets)
{
return runtimePackAssets.GroupBy(asset => asset.PackageName + "/" + asset.PackageVersion).Select(
runtimePackAssetGroup =>
{
// Prefix paths with "./" to workaround https://github.com/dotnet/core-setup/issues/4978
List<RuntimeAssetGroup> runtimeAssemblyGroups = new List<RuntimeAssetGroup>()
{
new RuntimeAssetGroup(string.Empty,
runtimePackAssetGroup.Where(asset => asset.AssetType == AssetType.Runtime)
.Select(asset => CreateRuntimeFile("./" + asset.DestinationSubPath, asset.SourcePath)))
};
List<RuntimeAssetGroup> nativeLibraryGroups = new List<RuntimeAssetGroup>()
{
new RuntimeAssetGroup(string.Empty,
runtimePackAssetGroup.Where(asset => asset.AssetType == AssetType.Native)
.Select(asset => CreateRuntimeFile($"./" + asset.DestinationSubPath, asset.SourcePath)))
};
return new RuntimeLibrary("runtimepack",
"runtimepack." + runtimePackAssetGroup.First().PackageName,
runtimePackAssetGroup.First().PackageVersion,
hash: string.Empty,
runtimeAssemblyGroups,
nativeLibraryGroups,
resourceAssemblies: Enumerable.Empty<ResourceAssembly>(),
dependencies: Enumerable.Empty<Dependency>(),
serviceable: false);
});
}