Skip to content
Merged
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
6 changes: 3 additions & 3 deletions SharpGen/Parser/SdkResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -64,10 +64,10 @@ private string GetVSInstallPath()
do
{
enumInstances.Next(1, instances, out fetched);
var instance2 = (ISetupInstance2)instances[0];
var state = instance2.GetState();
if (fetched > 0)
{
var instance2 = (ISetupInstance2)instances[0];
var state = instance2.GetState();
if ((state & InstanceState.Registered) == InstanceState.Registered)
{
if (instance2.GetPackages().Any(pkg => pkg.GetId() == "Microsoft.VisualStudio.Component.VC.Tools.x86.x64"))
Expand All @@ -79,7 +79,7 @@ private string GetVSInstallPath()
}
while (fetched > 0);

Logger.Fatal("Unable to find compatible Visual Studio installation path.");
Logger.Fatal("Unable to find a Visual Studio installation that has the Visual C++ Toolchain installed.");

return null;
}
Expand Down