Skip to content

Commit

Permalink
Merge pull request #776 from StephenHodgson/HTK-BuildFixes
Browse files Browse the repository at this point in the history
Build & Deploy tools fix
  • Loading branch information
NeerajW committed Jul 17, 2017
2 parents bc4c46a + 697b14c commit 4d01fbb
Showing 1 changed file with 14 additions and 3 deletions.
17 changes: 14 additions & 3 deletions Assets/HoloToolkit/Build/Editor/BuildDeployTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,9 +109,20 @@ public static string CalcMSBuildPath(string msBuildVersion)
vswhereP.Dispose();
}

output = output + @"\MSBuild\" + msBuildVersion + @"\Bin\MSBuild.exe";
output = output.Replace(Environment.NewLine, "");
return output;
string externalScriptingEditorPath = EditorPrefs.GetString("kScriptsDefaultApp");
string[] paths = output.Split(new[] { Environment.NewLine }, StringSplitOptions.RemoveEmptyEntries);

for (int i = 0; i < paths.Length; i++)
{
paths[i] = paths[i].Replace(Environment.NewLine, "");
if (externalScriptingEditorPath.Contains(paths[i]))
{
return paths[i] + @"\MSBuild\" + msBuildVersion + @"\Bin\MSBuild.exe";
}
}

Debug.LogError("Unable to find a valid path to Visual Studio Instance!");
return string.Empty;
}

public static bool RestoreNugetPackages(string nugetPath, string storePath)
Expand Down

0 comments on commit 4d01fbb

Please sign in to comment.