Trim platfrom libraries from deps fiels
This commit is contained in:
parent
191812690d
commit
6b54ae0bcc
8 changed files with 113 additions and 14 deletions
|
@ -140,8 +140,9 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
var buildExclusionList = context.GetTypeBuildExclusionList(exportsLookup);
|
||||
var allExclusionList = new HashSet<string>(platformExclusionList);
|
||||
allExclusionList.UnionWith(buildExclusionList);
|
||||
var filteredExports = exports.FilterExports(allExclusionList);
|
||||
|
||||
foreach (var export in FilterExports(exports, allExclusionList))
|
||||
foreach (var export in filteredExports)
|
||||
{
|
||||
Reporter.Verbose.WriteLine($"publish: Publishing {export.Library.Identity.ToString().Green().Bold()} ...");
|
||||
|
||||
|
@ -173,7 +174,10 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
{
|
||||
// Make executable in the new location
|
||||
var executable = new Executable(context, buildOutputPaths, outputPath, buildOutputPaths.IntermediateOutputDirectoryPath, exporter, configuration);
|
||||
executable.WriteConfigurationFiles(exports, FilterExports(exports, buildExclusionList), includeDevConfig: false);
|
||||
var runtimeExports = filteredExports;
|
||||
var compilationExports = exports.FilterExports(buildExclusionList);
|
||||
|
||||
executable.WriteConfigurationFiles(exports, runtimeExports, compilationExports, includeDevConfig: false);
|
||||
}
|
||||
|
||||
var contentFiles = new ContentFiles(context);
|
||||
|
@ -206,10 +210,6 @@ namespace Microsoft.DotNet.Tools.Publish
|
|||
return true;
|
||||
}
|
||||
|
||||
private static IEnumerable<LibraryExport> FilterExports(IEnumerable<LibraryExport> exports, HashSet<string> exclusionList)
|
||||
{
|
||||
return exports.Where(e => !exclusionList.Contains(e.Library.Identity.Name));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Filters which export's RuntimeAssets should get copied to the output path.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue