anchor.diff:  let directorySeparator = Path.DirectorySeparatorChar.ToString()
   
   /// Convert the given windows path to a path in the current system
  -let convertWindowsToCurrentPath (windowsPath:string) = 
  -    if (windowsPath.Length > 2 && windowsPath.[1] = ':' && windowsPath.[2] = '\\') then
  -        windowsPath
  -    else
  -        windowsPath.Replace(@"\",directorySeparator)
  +let convertWindowsToCurrentPath (windowsPath : string) = 
  +    if (windowsPath.Length > 2 && windowsPath.[1] = ':' && windowsPath.[2] = '\\') then windowsPath
  +    else windowsPath.Replace(@"\", directorySeparator)
   
   /// Contains the IO encoding which is given via build parameter "encoding" or the default encoding if no encoding was specified.
  -let encoding =
  +let encoding = 
       match getBuildParamOrDefault "encoding" "default" with
       | "default" -> Text.Encoding.Default
       | enc -> Text.Encoding.GetEncoding(enc)
  
positive.code: /// Returns a sequence with all installed .NET framework versions
  let getInstalledDotNetFrameworks() = 
      let frameworks = new ResizeArray<_>()
      try
          let matches = 
              Registry
                .LocalMachine
                .OpenSubKey(@"SOFTWARE\Microsoft\NET Framework Setup\NDP")
                .GetSubKeyNames()
              |> Seq.filter (fun keyname -> Regex.IsMatch(keyname, @"^v\d"))
  
          for item in matches do
              match item with
              | "v4.0" -> ()
              | "v4" ->
                  let key = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\" + item
                  Registry.LocalMachine.OpenSubKey(key).GetSubKeyNames()
                  |> Seq.iter (fun subkey -> 
                                  let key = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\" + item + @"\" + subkey
                                  let version = Registry.LocalMachine.OpenSubKey(key).GetValue("Version").ToString();
                                  frameworks.Add(String.Format("{0} ({1})", version, subkey)))
              | "v1.1.4322" -> frameworks.Add item
              | _ ->
                      let key = @"SOFTWARE\Microsoft\NET Framework Setup\NDP\" + item;
                      frameworks.Add(Registry.LocalMachine.OpenSubKey(key).GetValue("Version").ToString());
          frameworks :> seq<_>
      with e ->
          frameworks :> seq<_> //Probably a new unrecognisable version
  
  /// A record which allows to display lots of machine specific information like machine name, processor count etc.
  type MachineDetails = {
      ProcessorCount : int
      Is64bit : bool
      OperatingSystem : string
      MachineName : string
      NETFrameworks : seq<string>
      UserDomainName : string
      AgentVersion: string
      DriveInfo: seq<string>
  }
  
  /// Retrieves information about the hard drives
  let getDrivesInfo() =
      Environment.GetLogicalDrives()
      |> Seq.map(fun d -> IO.DriveInfo(d))
      |> Seq.filter(fun d -> d.IsReady)
      |> Seq.map(fun d -> 
          sprintf "%s has %0.1fGB free of %0.1fGB"
              (d.Name.Replace(":\\", "")) 
              (Convert.ToDouble(d.TotalFreeSpace) / (1024.*1024.*1024.))
              (Convert.ToDouble(d.TotalSize) / (1024.*1024.*1024.))
      )
  
  /// Retrieves lots of machine specific information like machine name, processor count etc.
  let getMachineEnvironment() = 
       {
          ProcessorCount = Environment.ProcessorCount
          Is64bit = Environment.Is64BitOperatingSystem
          OperatingSystem = Environment.OSVersion.ToString()
          MachineName = Environment.MachineName
          NETFrameworks = getInstalledDotNetFrameworks()
          UserDomainName = Environment.UserDomainName
          AgentVersion = sprintf "%A" ((System.Reflection.Assembly.GetAssembly(typedefof<MachineDetails>)).GetName().Version)
          DriveInfo = getDrivesInfo()
       }  
       
  
negative.code: let isMacOS = Environment.OSVersion.Platform = PlatformID.MacOSX
  
  /// Determines if the current system is a Linux system
  let isLinux = int System.Environment.OSVersion.Platform |> fun p -> (p = 4) || (p = 6) || (p = 128)
  
  /// Determines if the current system is a mono system
  /// Todo: Detect mono on windows
  let isMono = isLinux || isUnix || isMacOS
  
  /// Modifies the ProcessStartInfo according to the platform semantics
  let platformInfoAction (psi : ProcessStartInfo) = 
      if isMono && psi.FileName.EndsWith ".exe" then 
          psi.Arguments <- psi.FileName + " " + psi.Arguments
          psi.FileName <- "mono"
  
  /// The path of the current target platform
  let mutable TargetPlatformPrefix = 
      let (<|>) a b = 
          match a with
          | None -> b
          | _ -> a
      environVarOrNone "FrameworkDir32" <|> if (String.IsNullOrEmpty SystemRoot) then None
                                            else Some(SystemRoot @@ @"Microsoft.NET\Framework") 
      <|> if (isUnix) then Some "/usr/lib/mono"
          else Some @"C:\Windows\Microsoft.NET\Framework"
      |> Option.get
  
  /// Gets the local directory for the given target platform
  let getTargetPlatformDir platformVersion = 
      if Directory.Exists(TargetPlatformPrefix + "64") then (TargetPlatformPrefix + "64") @@ platformVersion
      else TargetPlatformPrefix @@ platformVersion
  
  /// The path to the personal documents
  let documentsFolder = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments)
  