Skip to content

Commit

Permalink
Fix ValidateBuildEnvironment task to work on multiple OSes (dotnet#24765
Browse files Browse the repository at this point in the history
)
  • Loading branch information
agocke committed Feb 12, 2018
1 parent 5c9cd2a commit ac0fe49
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Tools/BuildUtil/ValidateBuildEnvironment.cs
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ public override bool Execute()

if (MSBuildMinimumFileVersion != null)
{
var msbuildFilePath = Path.Combine(MSBuildBinPath, "msbuild.exe");
var msbuildFileName = "MSBuild." + (Environment.NewLine == "\r\n" ? "exe" : "dll");
var msbuildFilePath = Path.Combine(MSBuildBinPath, msbuildFileName);
var fileVersionInfo = FileVersionInfo.GetVersionInfo(msbuildFilePath);
var fileVersion = new Version(fileVersionInfo.FileVersion);
var minimumVersion = new Version(MSBuildMinimumFileVersion);
Expand Down

0 comments on commit ac0fe49

Please sign in to comment.