src/Resolvers/Microsoft.NET.Sdk.WorkloadManifestReader/WorkloadResolver.cs
/// <summary>
/// Recommends a set of workloads should be installed on top of the existing installed workloads to provide the specified missing packs
/// </summary>
/// <remarks>
/// Used by the MSBuild workload resolver to emit actionable errors
/// </remarks>
Recommends a set of workloads should be installed on top of the existing installed workloads to provide the specified missing packs
Recommends a set of workloads should be installed on top of the existing installed workloads to provide the specified missing packs
public ISet<WorkloadInfo> GetWorkloadSuggestionForMissingPacks(IList<string> packIds)
        {
            var requestedPacks = new HashSet<WorkloadPackId>(packIds.Select(p => new WorkloadPackId(p)));
            var expandedWorkloads = _workloads.Select(w => (w.Key, new HashSet<WorkloadPackId>(GetPacksInWorkload(w.Value))));
            var finder = new WorkloadSuggestionFinder(GetInstalledPacks(), requestedPacks, expandedWorkloads);
            return new HashSet<WorkloadInfo>
            (
                finder.GetBestSuggestion().Workloads.Select(s => new WorkloadInfo(s.ToString(), _workloads[s].Description))
            );
        }
public ISet < WorkloadInfo > GetWorkloadSuggestionForMissingPacks ( IList < string > packIds ) { var requestedPacks = new HashSet < WorkloadPackId > ( packIds . Select ( p => new WorkloadPackId ( p ) ) ) ; var expandedWorkloads = _workloads . Select ( w => ( w . Key , new HashSet < WorkloadPackId > ( GetPacksInWorkload ( w . Value ) ) ) ) ; var finder = new WorkloadSuggestionFinder ( GetInstalledPacks ( ) , requestedPacks , expandedWorkloads ) ; return new HashSet < WorkloadInfo > ( finder . GetBestSuggestion ( ) . Workloads . Select ( s => new WorkloadInfo ( s . ToString ( ) , _workloads [ s ] . Description ) ) ) ; }
Recommends a set of workloads should be installed on top of the existing installed workloads to provide the specified missing packs
Recommends a set of workloads should be installed on top of the existing installed workloads to provide the specified missing packs
packIds
IList<string>
remarks
Used by the MSBuild workload resolver to emit actionable errors
Used by the MSBuild workload resolver to emit actionable errors