Skip to content

Commit 8b5c58f

Browse files
ap0llorainersigwald
authored andcommitted
Return null from GetDevConsoleInstance() when version could not be parsed (#66)
1 parent bd25ad7 commit 8b5c58f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/MSBuildLocator/MSBuildLocator.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -345,7 +345,10 @@ private static VisualStudioInstance GetDevConsoleInstance()
345345
Version.TryParse(versionString, out version);
346346
}
347347

348-
return new VisualStudioInstance("DEVCONSOLE", path, version, DiscoveryType.DeveloperConsole);
348+
if(version != null)
349+
{
350+
return new VisualStudioInstance("DEVCONSOLE", path, version, DiscoveryType.DeveloperConsole);
351+
}
349352
}
350353

351354
return null;

0 commit comments

Comments
 (0)