Skip to content

Commit

Permalink
Merge branch 'Redth-msbuild-macosx' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
agc93 committed Mar 8, 2017
2 parents fc1a34e + 3046320 commit a06f66c
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/Cake.Common/Tools/MSBuild/MSBuildResolver.cs
Expand Up @@ -12,6 +12,18 @@ internal static class MSBuildResolver
{
public static FilePath GetMSBuildPath(IFileSystem fileSystem, ICakeEnvironment environment, MSBuildToolVersion version, MSBuildPlatform buildPlatform)
{
if (environment.Platform.Family == PlatformFamily.OSX)
{
var macMSBuildPath = new FilePath("/Library/Frameworks/Mono.framework/Versions/Current/Commands/msbuild");

if (fileSystem.Exist(macMSBuildPath))
{
return macMSBuildPath;
}

throw new CakeException("Could not resolve MSBuild.");
}

var binPath = version == MSBuildToolVersion.Default
? GetHighestAvailableMSBuildVersion(fileSystem, environment, buildPlatform)
: GetMSBuildPath(fileSystem, environment, (MSBuildVersion)version, buildPlatform);
Expand Down

0 comments on commit a06f66c

Please sign in to comment.