Beispiel #1
0
        public override async Task Implement(SharedState sharedState, CancellationToken cancellationToken)
        {
            await base.Implement(sharedState, cancellationToken);

            ReportStatus($"Installing Pack: {Package.Id}...");

            var workloadManager = new DotNetWorkloadManager(SdkRoot, SdkVersion, NuGetPackageSources);

            if (await workloadManager.InstallWorkloadPack(SdkRoot, Package, cancellationToken))
            {
                ReportStatus($"Installed Pack: {Package.Id}.");
            }
            else
            {
                ReportStatus($"Failed to install Pack: {Package.Id}.");
            }
        }
Beispiel #2
0
        public override async Task Cure(CancellationToken cancellationToken)
        {
            await base.Cure(cancellationToken);

            foreach (var pack in Packages)
            {
                ReportStatus($"Installing Pack: {pack.Id}...");

                if (await WorkloadManager.InstallWorkloadPack(pack.Id, cancellationToken))
                {
                    ReportStatus($"Installed Pack: {pack.Id}.");
                }
                else
                {
                    ReportStatus($"Failed to install Pack: {pack.Id}.");
                }
            }
        }