Show / Hide Table of Contents

Class CustomDotNetCliToolchainBuilder

Inheritance
Object
CustomDotNetCliToolchainBuilder
NativeAotToolchainBuilder
Namespace: BenchmarkDotNet.Toolchains.DotNetCli
Assembly: BenchmarkDotNet.dll
Syntax
public abstract class CustomDotNetCliToolchainBuilder

Fields

customDotNetCliPath

Declaration
protected string customDotNetCliPath
Field Value
Type Description
String

displayName

Declaration
protected string displayName
Field Value
Type Description
String

Feeds

Declaration
protected readonly Dictionary<string, string> Feeds
Field Value
Type Description
Dictionary<String, String>

runtimeFrameworkVersion

Declaration
protected string runtimeFrameworkVersion
Field Value
Type Description
String

runtimeIdentifier

Declaration
protected string runtimeIdentifier
Field Value
Type Description
String

useNuGetClearTag

Declaration
protected bool useNuGetClearTag
Field Value
Type Description
Boolean

useTempFolderForRestore

Declaration
protected bool useTempFolderForRestore
Field Value
Type Description
Boolean

Methods

AdditionalNuGetFeed(String, String)

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

Declaration
public CustomDotNetCliToolchainBuilder AdditionalNuGetFeed(string feedName, string feedAddress)
Parameters
Type Name Description
String feedName

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

String feedAddress

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

Returns
Type Description
CustomDotNetCliToolchainBuilder

DisplayName(String)

Declaration
public CustomDotNetCliToolchainBuilder DisplayName(string newDisplayName)
Parameters
Type Name Description
String newDisplayName

the name of the toolchain to be displayed in results

Returns
Type Description
CustomDotNetCliToolchainBuilder

DotNetCli(String)

Declaration
public CustomDotNetCliToolchainBuilder DotNetCli(string newCustomDotNetCliPath)
Parameters
Type Name Description
String newCustomDotNetCliPath

if not provided, the one from PATH will be used

Returns
Type Description
CustomDotNetCliToolchainBuilder

GetTargetFrameworkMoniker()

Declaration
protected string GetTargetFrameworkMoniker()
Returns
Type Description
String

RuntimeFrameworkVersion(String)

Declaration
public CustomDotNetCliToolchainBuilder RuntimeFrameworkVersion(string newRuntimeFrameworkVersion)
Parameters
Type Name Description
String newRuntimeFrameworkVersion

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

Returns
Type Description
CustomDotNetCliToolchainBuilder

RuntimeIdentifier(String)

Declaration
public CustomDotNetCliToolchainBuilder RuntimeIdentifier(string newRuntimeIdentifier)
Parameters
Type Name Description
String newRuntimeIdentifier

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

Returns
Type Description
CustomDotNetCliToolchainBuilder

TargetFrameworkMoniker(String)

Declaration
public CustomDotNetCliToolchainBuilder TargetFrameworkMoniker(string targetFrameworkMoniker)
Parameters
Type Name Description
String targetFrameworkMoniker

TFM, example: netcoreapp2.1

Returns
Type Description
CustomDotNetCliToolchainBuilder

ToToolchain()

Declaration
public abstract IToolchain ToToolchain()
Returns
Type Description
IToolchain

UseNuGetClearTag(Boolean)

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

Declaration
public CustomDotNetCliToolchainBuilder UseNuGetClearTag(bool value)
Parameters
Type Name Description
Boolean value
Returns
Type Description
CustomDotNetCliToolchainBuilder

UseTempFolderForRestore(Boolean)

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

Declaration
public CustomDotNetCliToolchainBuilder UseTempFolderForRestore(bool value)
Parameters
Type Name Description
Boolean value
Returns
Type Description
CustomDotNetCliToolchainBuilder
In This Article
Back to top Copyright © 2013–2021 .NET Foundation and contributors