async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            using (var sourceCacheContext = new SourceCacheContext()) {
                await RestoreAnyMissingPackagesAsync(sourceCacheContext, cancellationToken);

                var resolutionContext = CreateResolutionContext(sourceCacheContext);

                actions = await packageManager.PreviewUpdatePackagesAsync(
                    packagesToUpdate,
                    projects,
                    resolutionContext,
                    context,
                    primarySources,
                    secondarySources,
                    cancellationToken);

                if (!actions.Any())
                {
                    foreach (IDotNetProject project in dotNetProjects)
                    {
                        packageManagementEvents.OnNoUpdateFound(project);
                    }
                    return;
                }

                if (LicensesMustBeAccepted)
                {
                    await CheckLicensesAsync(cancellationToken);
                }

                using (IDisposable fileMonitor = CreateFileMonitor()) {
                    using (var referenceMaintainer = new ProjectReferenceMaintainerCollection(projects)) {
                        await packageManager.ExecuteNuGetProjectActionsAsync(
                            projects,
                            actions,
                            context,
                            sourceCacheContext,
                            cancellationToken);

                        await referenceMaintainer.ApplyChangesAsync();
                    }
                }

                OnAfterExecutionActions();

                await RunPostProcessAsync(cancellationToken);

                await OpenReadmeFilesAsync(cancellationToken);
            }
        }
        async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            var resolutionContext = CreateResolutionContext();

            actions = await packageManager.PreviewUpdatePackagesAsync(
                PackageId,
                project,
                resolutionContext,
                context,
                primarySources,
                new SourceRepository[0],
                cancellationToken);

            if (!actions.Any())
            {
                packageManagementEvents.OnNoUpdateFound(dotNetProject);
                return;
            }

            await CheckLicenses(cancellationToken);

            SetDirectInstall();

            using (IDisposable fileMonitor = CreateFileMonitor()) {
                using (var referenceMaintainer = new ProjectReferenceMaintainer(project)) {
                    await packageManager.ExecuteNuGetProjectActionsAsync(
                        project,
                        actions,
                        context,
                        resolutionContext.SourceCacheContext,
                        cancellationToken);

                    await referenceMaintainer.ApplyChanges();
                }
            }

            packageManager.ClearDirectInstall(context);

            project.OnAfterExecuteActions(actions);

            await project.RunPostProcessAsync(context, cancellationToken);
        }
        async Task ExecuteAsync(CancellationToken cancellationToken)
        {
            await RestoreAnyMissingPackages(cancellationToken);

            var resolutionContext = CreateResolutionContext();

            actions = await packageManager.PreviewUpdatePackagesAsync(
                project,
                resolutionContext,
                context,
                primarySources,
                new SourceRepository[0],
                cancellationToken);

            if (!actions.Any())
            {
                packageManagementEvents.OnNoUpdateFound(dotNetProject);
                return;
            }

            await CheckLicenses(cancellationToken);

            using (IDisposable fileMonitor = CreateFileMonitor()) {
                using (IDisposable referenceMaintainer = CreateLocalCopyReferenceMaintainer()) {
                    await packageManager.ExecuteNuGetProjectActionsAsync(
                        project,
                        actions,
                        context,
                        resolutionContext.SourceCacheContext,
                        cancellationToken);
                }
            }

            project.OnAfterExecuteActions(actions);

            await project.RunPostProcessAsync(context, cancellationToken);

            await OpenReadmeFiles(cancellationToken);
        }