Skip to content

Commit

Permalink
Merge pull request #553 from mousetraps/import
Browse files Browse the repository at this point in the history
#427 Visual Studio locks up when I create project from Existing Node.js
  • Loading branch information
mousetraps committed Oct 20, 2015
2 parents 9c60662 + c330cb1 commit cac24a7
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
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 @@ class ImportWizardCommand : Command {
} 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 @@ internal class ImportSettings : DependencyObject {
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

0 comments on commit cac24a7

Please sign in to comment.