Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions Nodejs/Product/Nodejs/Commands/ImportWizardCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,12 +16,14 @@

using System;
using System.IO;
using System.Threading.Tasks;
using System.Threading;
using System.Windows;
using Microsoft.NodejsTools.Project;
using Microsoft.VisualStudio;
using Microsoft.VisualStudio.Shell.Interop;
using Microsoft.VisualStudioTools;

namespace Microsoft.NodejsTools.Commands {
/// <summary>
/// Provides the command to import a project from existing code.
Expand Down Expand Up @@ -89,7 +91,10 @@ public override void DoCommand(object sender, EventArgs args) {
} else {
statusBar.SetText("An error occurred and your project was not created.");
}
}, System.Threading.Tasks.TaskScheduler.FromCurrentSynchronizationContext());
},
CancellationToken.None,
TaskContinuationOptions.HideScheduler,
System.Threading.Tasks.TaskScheduler.FromCurrentSynchronizationContext());
} else {
statusBar.SetText("");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ public Task<string> CreateRequestedProjectAsync() {
string filters = Filters;
string startupFile = StartupFile;
bool excludeNodeModules = ExcludeNodeModules;
return Task.Factory.StartNew<string>(() => {
return Task.Run<string>(() => {
bool success = false;
Guid projectGuid;
try {
Expand Down