anchor.diff:          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 <- dotnetSDKPath </> (if isWindows then "dotnet.exe" else "dotnet")
  +
  +    // let oldPath = System.Environment.GetEnvironmentVariable("PATH")
  +    // System.Environment.SetEnvironmentVariable("PATH", sprintf "%s%s%s" dotnetSDKPath (System.IO.Path.PathSeparator.ToString()) oldPath)
   )
   
   // --------------------------------------------------------------------------------------
  
positive.code: 
  let serverPath = "./src/Server/" |> FullName
  
  let dotnetcliVersion = "1.0.0-rc4-004771"
  
  let dotnetSDKPath = System.Environment.GetFolderPath(Environment.SpecialFolder.LocalApplicationData) </> "dotnetcore" |> FullName
  
  let dotnetExePath =
      dotnetSDKPath </> (if isWindows then "dotnet.exe" else "dotnet")
      |> FullName
  
  let deployDir = "./deploy"
  
  
negative.code: Target "InstallDotNetCore" (fun _ ->
      let correctVersionInstalled = 
          try
              let processResult = 
                  ExecProcessAndReturnMessages (fun info ->  
                  info.FileName <- dotnetExePath
                  info.WorkingDirectory <- Environment.CurrentDirectory
                  info.Arguments <- "--version") (TimeSpan.FromMinutes 30.)
  
              processResult.Messages |> separated "" = dotnetcliVersion
          with 
          | _ -> false
  
  