Skip to content

Commit e074e55

Browse files
author
Paul van Brenk
committed
PR feedback
1 parent 01771c5 commit e074e55

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Nodejs/Product/Nodejs/NodejsTools.vsct

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -210,6 +210,7 @@
210210
</Strings>
211211
</Button>
212212

213+
<!-- This button is invoked by code in the Import Wizard. So it's invisible, but still very much needed. -->
213214
<Button guid="guidNodeToolsCmdSet" id="cmdidImportWizard" priority="0x010" type="Button">
214215
<CommandFlag>DefaultInvisible</CommandFlag>
215216
<Strings>

Nodejs/Product/ProjectWizard/ImportWizard.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,14 @@ public void RunStarted(object automationObject, Dictionary<string, string> repla
3434
var hr = EnsurePackageLoaded(serviceProvider);
3535
if (ErrorHandler.Failed(hr))
3636
{
37-
MessageBox.Show(string.Format(ProjectWizardResources.ImportWizardCouldNotStartFailedToLoadPackage, hr), "Visual Studio");
37+
MessageBox.Show(string.Format(ProjectWizardResources.ImportWizardCouldNotStartFailedToLoadPackage, hr), SR.ProductName);
3838
throw new WizardBackoutException();
3939
}
4040
var uiShell = (IVsUIShell)serviceProvider.GetService(typeof(SVsUIShell));
4141

42-
var projName = replacementsDictionary["$projectname$"];
43-
replacementsDictionary.TryGetValue("$specifiedsolutionname$", out var solnName);
4442
string directory;
45-
if (string.IsNullOrWhiteSpace(solnName))
43+
var projName = replacementsDictionary["$projectname$"];
44+
if (!replacementsDictionary.TryGetValue("$specifiedsolutionname$", out var solnName) || string.IsNullOrWhiteSpace(solnName))
4645
{
4746
// Create directory is unchecked, destinationdirectory is the
4847
// directory name the user entered plus the project name, we want
@@ -64,7 +63,7 @@ public void RunStarted(object automationObject, Dictionary<string, string> repla
6463
hr = uiShell.PostExecCommand(ref guid, (uint)PkgCmdId.cmdidImportWizard, 0, ref inObj);
6564
if (ErrorHandler.Failed(hr))
6665
{
67-
MessageBox.Show(string.Format(ProjectWizardResources.ImportWizardCouldNotStartUnexpectedError, hr), "Visual Studio");
66+
MessageBox.Show(string.Format(ProjectWizardResources.ImportWizardCouldNotStartUnexpectedError, hr), SR.ProductName);
6867
}
6968
}
7069

0 commit comments

Comments
 (0)