Table of Contents

Class CustomDotNetCliToolchainBuilder

Namespace
BenchmarkDotNet.Toolchains.DotNetCli
Assembly
BenchmarkDotNet.dll
public abstract class CustomDotNetCliToolchainBuilder
Inheritance
CustomDotNetCliToolchainBuilder
Derived

Constructors

CustomDotNetCliToolchainBuilder()

protected CustomDotNetCliToolchainBuilder()

Fields

Feeds

protected readonly Dictionary<string, string> Feeds

Field Value

Dictionary<string, string>

customDotNetCliPath

protected string customDotNetCliPath

Field Value

string

displayName

protected string displayName

Field Value

string

runtimeFrameworkVersion

protected string runtimeFrameworkVersion

Field Value

string

runtimeIdentifier

protected string runtimeIdentifier

Field Value

string

useNuGetClearTag

protected bool useNuGetClearTag

Field Value

bool

useTempFolderForRestore

protected bool useTempFolderForRestore

Field Value

bool

Methods

AdditionalNuGetFeed(string, string)

it allows you to define an additional NuGet feed, you can seal the feeds list by using the UseNuGetClearTag() method

public CustomDotNetCliToolchainBuilder AdditionalNuGetFeed(string feedName, string feedAddress)

Parameters

feedName string

the name of the feed, will be used in the auto-generated NuGet.config file

feedAddress string

the address of the feed, will be used in the auto-generated NuGet.config file

Returns

CustomDotNetCliToolchainBuilder

DisplayName(string)

public CustomDotNetCliToolchainBuilder DisplayName(string newDisplayName)

Parameters

newDisplayName string

the name of the toolchain to be displayed in results

Returns

CustomDotNetCliToolchainBuilder

DotNetCli(string)

public CustomDotNetCliToolchainBuilder DotNetCli(string newCustomDotNetCliPath)

Parameters

newCustomDotNetCliPath string

if not provided, the one from PATH will be used

Returns

CustomDotNetCliToolchainBuilder

GetTargetFrameworkMoniker()

protected string GetTargetFrameworkMoniker()

Returns

string

RuntimeFrameworkVersion(string)

public CustomDotNetCliToolchainBuilder RuntimeFrameworkVersion(string newRuntimeFrameworkVersion)

Parameters

newRuntimeFrameworkVersion string

optional, when set it's copied to the generated .csproj file

Returns

CustomDotNetCliToolchainBuilder

RuntimeIdentifier(string)

public CustomDotNetCliToolchainBuilder RuntimeIdentifier(string newRuntimeIdentifier)

Parameters

newRuntimeIdentifier string

if not provided, portable OS-arch will be used (example: "win-x64", "linux-x86")

Returns

CustomDotNetCliToolchainBuilder

TargetFrameworkMoniker(string)

public CustomDotNetCliToolchainBuilder TargetFrameworkMoniker(string targetFrameworkMoniker)

Parameters

targetFrameworkMoniker string

TFM, example: netcoreapp2.1

Returns

CustomDotNetCliToolchainBuilder

ToToolchain()

public abstract IToolchain ToToolchain()

Returns

IToolchain

UseNuGetClearTag(bool)

emits clear tag in the auto-generated NuGet.config file

public CustomDotNetCliToolchainBuilder UseNuGetClearTag(bool value)

Parameters

value bool

Returns

CustomDotNetCliToolchainBuilder

UseTempFolderForRestore(bool)

restore to temp folder to keep your CI clean or install same package many times (perhaps with different content but same version number), by default true for local builds https://github.com/dotnet/corefx/blob/master/Documentation/project-docs/dogfooding.md#3---consuming-subsequent-code-changes-by-rebuilding-the-package-alternative-2

public CustomDotNetCliToolchainBuilder UseTempFolderForRestore(bool value)

Parameters

value bool

Returns

CustomDotNetCliToolchainBuilder