anchor.diff:  )
   
   Target "InstallDotNetCore" (fun _ ->
  -    let correctVersionInstalled = 
  -        try if FileInfo(dotnetExePath |> Path.GetFullPath).Exists then
  -                let processResult = 
  -                    ExecProcessAndReturnMessages (fun info ->  
  -                    info.FileName <- dotnetExePath
  -                    info.WorkingDirectory <- Environment.CurrentDirectory
  -                    info.Arguments <- "--version") (TimeSpan.FromMinutes 30.)
  -
  -                processResult.Messages |> separated "" = dotnetcliVersion
  -            else false
  -        with  _ -> false
  -
  -    if correctVersionInstalled then
  -        tracefn "dotnetcli %s already installed" dotnetcliVersion
  -    else
  -        CleanDir dotnetSDKPath
  -        let archiveFileName = 
  -            if isLinux then
  -                sprintf "dotnet-dev-ubuntu-x64.%s.tar.gz" dotnetcliVersion
  -            elif Fake.EnvironmentHelper.isMacOS then
  -                sprintf "dotnet-dev-osx-x64.%s.tar.gz" dotnetcliVersion
  -            else
  -                sprintf "dotnet-dev-win-x64.%s.zip" dotnetcliVersion
  -        let downloadPath = 
  -                sprintf "https://dotnetcli.azureedge.net/dotnet/Sdk/%s/%s" dotnetcliVersion archiveFileName
  -        let localPath = Path.Combine(dotnetSDKPath, archiveFileName)
  -
  -        tracefn "Installing '%s' to '%s'" downloadPath localPath
  -        
  -        use webclient = new Net.WebClient()
  -        webclient.DownloadFile(downloadPath, localPath)
  -
  -        if isLinux || isMacOS then
  -            let assertExitCodeZero x =
  -                if x = 0 then () else
  -                failwithf "Command failed with exit code %i" x
  -
  -            Shell.Exec("tar", sprintf """-xvf "%s" -C "%s" """ localPath dotnetSDKPath)
  -            |> assertExitCodeZero
  -        else  
  -            System.IO.Compression.ZipFile.ExtractToDirectory(localPath, dotnetSDKPath)
  -        
  -        tracefn "dotnet cli path - %s" dotnetSDKPath
  -        System.IO.Directory.EnumerateFiles dotnetSDKPath
  -        |> Seq.iter (fun path -> tracefn " - %s" path)
  -        System.IO.Directory.EnumerateDirectories dotnetSDKPath
  -        |> Seq.iter (fun path -> tracefn " - %s%c" path System.IO.Path.DirectorySeparatorChar)
  -
  -    let oldPath = System.Environment.GetEnvironmentVariable("PATH")
  -    System.Environment.SetEnvironmentVariable("PATH", sprintf "%s%s%s" dotnetSDKPath (System.IO.Path.PathSeparator.ToString()) oldPath)
  +    dotnetExePath <- DotNetCli.InstallDotNetSDK dotnetcliVersion
   )
   
   // --------------------------------------------------------------------------------------
  
positive.code:   =?> ("InstallDotNetCore", not <| hasBuildParam "DISABLE_NETCORE")
    =?> ("DotnetRestore", not <| hasBuildParam "DISABLE_NETCORE")
    =?> ("DotnetBuild", not <| hasBuildParam "DISABLE_NETCORE")
    =?> ("MSBuildRestore", not isMono)
    ==> "Build"
    =?> ("DotnetPackage", not <| hasBuildParam "DISABLE_NETCORE")
    =?> ("BuildPowerShell", not isMono)
  
negative.code: // The url for the raw files hosted
  let gitRaw = environVarOrDefault "gitRaw" "https://raw.github.com/fsprojects"
  
  let dotnetcliVersion = "1.0.4"
  
  let dotnetSDKPath = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) </> "dotnetcore" |> FullName
  
  
  let mutable dotnetExePath = "dotnet"    
  
  let netcoreFiles = !! "src/**.preview?/*.fsproj" |> Seq.toList
  
  