DotNet

Nested types and modules

TypeDescription
BuildConfiguration

build configuration

BuildOptions

dotnet build command options

CliArchitecture

.NET Core SDK architecture

CliInstallOptions

.NET Core SDK install options

CliVersion

.NET Core SDK version (used to specify version when installing .NET Core SDK)

InfoOptions

dotnet --info command options

InfoResult

dotnet info result

InstallerOptions

.NET Core SDK installer download options

MSBuildOptions

dotnet restore command options

Options

dotnet cli command execution options

PackOptions

dotnet pack command options

PublishOptions

dotnet publish command options

RestoreOptions

dotnet restore command options

TestOptions

dotnet test command options

Verbosity

dotnet restore verbosity

VersionOptions

dotnet --version command options

VersionResult

dotnet info result

ModuleDescription
BuildConfiguration
Options
Versions

The a list of well-known versions to install

Functions and values

Function or valueDescription
DotNet.build setParams project
Signature: setParams:(BuildOptions -> BuildOptions) -> project:string -> unit

Execute dotnet build command

Parameters

  • 'setParams' - set compile command parameters
  • 'project' - project to compile
DotNet.downloadInstaller(setParams)
Signature: setParams:(InstallerOptions -> InstallerOptions) -> string

Download .NET Core SDK installer

Parameters

  • 'setParams' - set download installer options
DotNet.exec buildOptions command args
Signature: buildOptions:(Options -> Options) -> command:string -> args:string -> ProcessResult

Execute raw dotnet cli command

Parameters

  • 'options' - common execution options
  • 'command' - the sdk command to execute 'test', 'new', 'build', ...
  • 'args' - command arguments
DotNet.getSDKVersionFromGlobalJson()
Signature: unit -> string

Gets the DotNet SDK from the global.json This file can exist in the working directory or any of the parent directories

DotNet.getVersion(setParams)
Signature: setParams:(VersionOptions -> VersionOptions) -> string

Execute dotnet --version command

Parameters

  • 'setParams' - set version command parameters
DotNet.info(setParams)
Signature: setParams:(InfoOptions -> InfoOptions) -> InfoResult

Execute dotnet --info command

Parameters

  • 'setParams' - set info command parameters
DotNet.install(setParams)
Signature: setParams:(CliInstallOptions -> CliInstallOptions) -> Options -> Options

Install .NET Core SDK if required

Parameters

  • 'setParams' - set installation options
DotNet.LatestPreview4ToolingOptions(...)
Signature: options:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use a stable release at this point")>]
OBSOLETE

Please use a stable release at this point

.NET Core SDK install options preconfigured for preview4 tooling

DotNet.msbuild setParams project
Signature: setParams:(MSBuildOptions -> MSBuildOptions) -> project:string -> unit

Runs a MSBuild project

Parameters

  • setParams - A function that overwrites the default MSBuildOptions
  • project - A string with the path to the project file to build.

Sample

 1: 
 2: 
 3: 
 4: 
 5: 
 6: 
 7: 
 8: 
 9: 
10: 
11: 
12: 
13: 
14: 
15: 
16: 
17: 
18: 
open Fake.DotNet
let setMsBuildParams (defaults:MSBuild.CliArguments) =
        { defaults with
            Verbosity = Some(Quiet)
            Targets = ["Build"]
            Properties =
                [
                    "Optimize", "True"
                    "DebugSymbols", "True"
                    "Configuration", "Release"
                ]
         }
let setParams (defaults:DotNet.MSBuildOptions) =
        { defaults with
            MSBuildParams = setMsBuildParams defaults.MSBuildParams
         }

DotNet.msbuild setParams "./MySolution.sln"
namespace Fake
namespace Fake.DotNet
val setMsBuildParams : defaults:MSBuild.CliArguments -> MSBuild.CliArguments
val defaults : MSBuild.CliArguments
module MSBuild

from Fake.DotNet
type CliArguments =
  {Targets: string list;
   Properties: (string * string) list;
   MaxCpuCount: int option option;
   DoRestore: bool;
   NoLogo: bool;
   NodeReuse: bool;
   ToolsVersion: string option;
   Verbosity: MSBuildVerbosity option;
   NoConsoleLogger: bool;
   WarnAsError: string list option;
   ...}
    static member Create : unit -> CliArguments
union case Option.Some: Value: 'T -> Option<'T>
union case MSBuildVerbosity.Quiet: MSBuildVerbosity
val setParams : defaults:DotNet.MSBuildOptions -> DotNet.MSBuildOptions
val defaults : DotNet.MSBuildOptions
module DotNet

from Fake.DotNet
type MSBuildOptions =
  {Common: Options;
   MSBuildParams: CliArguments;}
    member WithCommon : f:(Options -> Options) -> MSBuildOptions
    member WithEnvironment : map:Map<string,string> -> MSBuildOptions
    member WithMSBuildParams : f:(CliArguments -> CliArguments) -> MSBuildOptions
    member WithRedirectOutput : shouldRedirect:bool -> MSBuildOptions
    member Environment : Map<string,string>
    static member Create : unit -> MSBuildOptions
type MSBuildParams =
  {ToolPath: string;
   WorkingDirectory: string;
   Targets: string list;
   Properties: (string * string) list;
   MaxCpuCount: int option option;
   DoRestore: bool;
   NoLogo: bool;
   NodeReuse: bool;
   RestorePackagesFlag: bool;
   ToolsVersion: string option;
   ...}
    member WithEnvironment : map:Map<string,string> -> MSBuildParams
    static member Create : unit -> MSBuildParams
DotNet.MSBuildOptions.MSBuildParams: MSBuild.CliArguments
val msbuild : setParams:(DotNet.MSBuildOptions -> DotNet.MSBuildOptions) -> project:string -> unit
DotNet.pack setParams project
Signature: setParams:(PackOptions -> PackOptions) -> project:string -> unit

Execute dotnet pack command

Parameters

  • 'setParams' - set pack command parameters
  • 'project' - project to pack
DotNet.Preview2ToolingOptions(options)
Signature: options:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use a stable release at this point")>]
OBSOLETE

Please use a stable release at this point

.NET Core SDK install options preconfigured for preview2 tooling

DotNet.publish setParams project
Signature: setParams:(PublishOptions -> PublishOptions) -> project:string -> unit

Execute dotnet publish command

Parameters

  • 'setParams' - set publish command parameters
  • 'project' - project to publish
DotNet.RC4_004771ToolingOptions(options)
Signature: options:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use a stable release at this point")>]
OBSOLETE

Please use a stable release at this point

.NET Core SDK install options preconfigured for preview4 tooling

DotNet.RC4_004973ToolingOptions(options)
Signature: options:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use a stable release at this point")>]
OBSOLETE

Please use a stable release at this point

.NET Core SDK install options preconfigured for preview4 tooling, this is marketized as v1.0.1 release of the .NET Core tools

DotNet.Release_1_0_4(options)
Signature: options:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use DotNet.Versions.Release_1_0_4 instead")>]
OBSOLETE

Please use DotNet.Versions.Release_1_0_4 instead

DotNet.Release_2_0_0(options)
Signature: options:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use DotNet.Versions.Release_2_0_0 instead")>]
OBSOLETE

Please use DotNet.Versions.Release_2_0_0 instead

DotNet.Release_2_0_3(options)
Signature: options:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use DotNet.Versions.Release_2_0_3 instead")>]
OBSOLETE

Please use DotNet.Versions.Release_2_0_3 instead

DotNet.Release_2_1_300(option)
Signature: option:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use DotNet.Versions.Release_2_1_300 instead")>]
OBSOLETE

Please use DotNet.Versions.Release_2_1_300 instead

DotNet.Release_2_1_300_RC1(option)
Signature: option:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use DotNet.Versions.Release_2_1_300_RC1 instead")>]
OBSOLETE

Please use DotNet.Versions.Release_2_1_300_RC1 instead

DotNet.Release_2_1_4(options)
Signature: options:CliInstallOptions -> CliInstallOptions
Attributes:
[<Obsolete("Please use DotNet.Versions.Release_2_1_4 instead")>]
OBSOLETE

Please use DotNet.Versions.Release_2_1_4 instead

DotNet.restore setParams project
Signature: setParams:(RestoreOptions -> RestoreOptions) -> project:string -> unit

Execute dotnet restore command

Parameters

  • 'setParams' - set restore command parameters
  • 'project' - project to restore packages
DotNet.test setParams project
Signature: setParams:(TestOptions -> TestOptions) -> project:string -> unit

Execute dotnet test command

Parameters

  • 'setParams' - set test command parameters
  • 'project' - project to test