Skip to content

.NET Command Line Interface and .NET Core SDK FAKE helpers

License

Notifications You must be signed in to change notification settings

dolly22/FAKE.Dotnet

Repository files navigation

FAKE.Dotnet

NuGet Status MyGet Status

"FAKE.Dotnet" is FAKE build automation system extension for .NET Core CLI tools. It contains helpers to download and install specific versions .NET Core SDK with CLI. Currently supports only windows.

See the API documentation for all available helpers and Release Notes for version details

.NET Core CLI (SDK) helper usage

.NET Core SDK is downloaded and installed using dotnet-install.ps1 powershell script. By default SDK is installed to %LOCALAPPDATA%\Microsoft\dotnet folder (and version subfolders).

  • DotnetSdkDownloadInstaller - download .NET Core SDK installer script
  • DotnetSdkInstall - install .NET Core SDK (when needed)
  • Dotnet - generic dotnet CLI command helper
  • DotnetRestore - dotnet restore packages helper
  • DotnetPack - dotnet pack helper
  • DotnetPublish - dotnet publish helper
  • DotnetBuild - dotnet build helper

example

There is sample project and build script for 1.0.1 SDK tooling

#r "tools/FAKE.Dotnet/tools/Fake.Dotnet.dll" // include Fake.Dotnet lib
open Fake.Dotnet

Target "Initialize" (fun _ ->
    DotnetSdkInstall SdkVersions.NetCore101
)

Target "BuildProjects" (fun _ ->
    let solutionFile = "solution.sln"

    DotnetRestore id solutionFile

    DotnetPack (fun c -> 
        { c with 
            Configuration = Debug;
            VersionSuffix = Some "ci-100";
            OutputPath = Some (currentDirectory @@ "artifacts")
        }) solutionFile
)

"Initialize"            // define the dependencies
      ==> "BuildProjects"

Run "BuildProjects"

Build the project

  • Windows: Run build.cmd

About

.NET Command Line Interface and .NET Core SDK FAKE helpers

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published