public void ItComputesExcludeFromPublishList() { LockFile lockFile = TestLockFiles.GetLockFile("dependencies.withgraphs"); ProjectContext projectContext = lockFile.CreateProjectContext( FrameworkConstants.CommonFrameworks.NetStandard16, runtime: null, Constants.DefaultPlatformLibrary, runtimeFrameworks: null, isSelfContained: false); IEnumerable <string> excludeFromPublishPackageIds = new[] { "Microsoft.Extensions.Logging.Abstractions" }; IDictionary <string, LockFileTargetLibrary> libraryLookup = projectContext .LockFileTarget .Libraries .ToDictionary(e => e.Name, StringComparer.OrdinalIgnoreCase); HashSet <string> exclusionList = projectContext.GetExcludeFromPublishList(excludeFromPublishPackageIds, libraryLookup); HashSet <string> expectedExclusions = new HashSet <string>() { "Microsoft.Extensions.Logging.Abstractions", "System.Collections.Concurrent", "System.Diagnostics.Tracing", }; exclusionList.Should().BeEquivalentTo(expectedExclusions); }