anchor.diff:          /// DotnetCli version
           Version: DotnetCliVersion;
           /// Distribution channel
  -        Channel: string option;
  +        Channel: DotnetCliChannel;
  +        /// Architecture
  +        Architecture: DotnetCliArchitecture;
           /// Custom installation directory (for local build installation)
  -        InstallDirectory: string option
  +        CustomInstallDir: string option
  +        /// Include symbols in the installation
  +        DebugSymbols: bool;
  +        /// If set it will not perform installation but instead display what command line to use
  +        DryRun: bool
  +        /// Do not update path variable
  +        NoPath: bool
       }
   
       /// Parameter default values.
       static member Default = {
           AlwaysDownload = false
           Version = Latest
  -        Channel = None
  -        InstallDirectory = None
  -    }
  -
  +        Channel = Preview
  +        Architecture = Auto
  +        CustomInstallDir = None
  +        DebugSymbols = false
  +        DryRun = false
  +        NoPath = true
  +    }
  +
  +/// [omit]
   let private optionToParam option paramFormat =
       match option with
       | Some value -> sprintf paramFormat value
       | None -> ""
   
   /// [omit]
  +let private boolToFlag value flagParam = 
  +    match value with
  +    | true -> flagParam
  +    | false -> ""
  +
  +/// [omit]
   let private buildDotnetCliInstallArgs (param: DotNetCliInstallOptions) =
  -    let versionParam = 
  +    let versionParamValue = 
           match param.Version with
  -        | Latest -> ""
  -        | Version ver -> sprintf "-version '%s'" ver
  +        | Latest -> "latest"
  +        | Lkg -> "lkg"
  +        | Version ver -> ver
  +
  +    let channelParamValue = 
  +        match param.Channel with
  +        | Future -> "future"
  +        | Preview -> "preview"
  +        | Production -> "production"
  +
  +    let architectureParamValue = 
  +        match param.Architecture with
  +        | Auto -> None
  +        | X86 -> Some "x86"
  +        | X64 -> Some "x64"
       [   
  -        versionParam
  -        optionToParam param.Channel "-channel '%s'"
  +        sprintf "-version '%s'" versionParamValue
  +        sprintf "-channel '%s'" channelParamValue
  +        optionToParam architectureParamValue "-architecture %s"
  +        boolToFlag param.DebugSymbols "-DebugSymbols"
  +        boolToFlag param.DryRun "-DryRun"
  +        boolToFlag param.NoPath "-NoPath"
       ] |> Seq.filter (not << String.IsNullOrEmpty) |> String.concat " "
   
   
  
positive.code: open System.IO
  
  /// Dotnet cli installer script
  let private dotnetCliInstaller = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain/install.ps1"
  
  /// Dotnet cli default install directory (set to default localappdata dotnet dir). Update this to redirect all tool commands to different location. 
  let mutable DefaultDotnetCliDir = environVar "LocalAppData" @@ "Microsoft" @@ "dotnet"
  
negative.code:         Common: DotnetOptions;
          /// Nuget feeds to search updates in. Use default if empty.
          Sources: string list;
          /// Directory to install packages in (--packages).
          Packages: string list;
          /// Path to the nuget configuration file (nuget.config).
          ConfigFile: string option;
          /// No cache flag (--no-cache)
          NoCache: bool;
          /// Restore logging verbosity (--verbosity)
          Verbosity: NugetRestoreVerbosity option
          /// Only warning failed sources if there are packages meeting version requirement (--ignore-failed-sources)
          IgnoreFailedSources: bool;
          /// Disables restoring multiple projects in parallel (--disable-parallel)
          DisableParallel: bool;
      }
  
      /// Parameter default values.
      static member Default = {
          Common = DotnetOptions.Default
          Sources = []
          Packages = []
          ConfigFile = None        
          NoCache = false
          Verbosity = None
          IgnoreFailedSources = false
          DisableParallel = false
      }
  
  /// [omit]
  let private buildRestoreArgs (param: DotnetRestoreOptions) =
      let restoreVerbosityParamValue = 
          match param.Verbosity with
          | Some v -> sprintf "--verbosity %s" <| v.ToString()
          | None -> ""
  
      [   param.Sources |> argList2 "source"
          param.Packages |> argList2 "packages"
          param.ConfigFile |> Option.toList |> argList2 "configFile"
          (if param.NoCache then "--no-cache" else "")
          (if param.IgnoreFailedSources then "--ignore-failed-sources" else "")
          (if param.DisableParallel then "--disable-parallel" else "")
          restoreVerbosityParamValue
      ] |> Seq.filter (not << String.IsNullOrEmpty) |> String.concat " "
  
  
  