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
customDotNetCliPath
protected string customDotNetCliPath
Field Value
displayName
protected string displayName
Field Value
runtimeFrameworkVersion
protected string runtimeFrameworkVersion
Field Value
runtimeIdentifier
protected string runtimeIdentifier
Field Value
useNuGetClearTag
protected bool useNuGetClearTag
Field Value
useTempFolderForRestore
protected bool useTempFolderForRestore
Field Value
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
stringthe name of the feed, will be used in the auto-generated NuGet.config file
feedAddress
stringthe address of the feed, will be used in the auto-generated NuGet.config file
Returns
DisplayName(string)
public CustomDotNetCliToolchainBuilder DisplayName(string newDisplayName)
Parameters
newDisplayName
stringthe name of the toolchain to be displayed in results
Returns
DotNetCli(string)
public CustomDotNetCliToolchainBuilder DotNetCli(string newCustomDotNetCliPath)
Parameters
newCustomDotNetCliPath
stringif not provided, the one from PATH will be used
Returns
GetTargetFrameworkMoniker()
protected string GetTargetFrameworkMoniker()
Returns
RuntimeFrameworkVersion(string)
public CustomDotNetCliToolchainBuilder RuntimeFrameworkVersion(string newRuntimeFrameworkVersion)
Parameters
newRuntimeFrameworkVersion
stringoptional, when set it's copied to the generated .csproj file
Returns
RuntimeIdentifier(string)
public CustomDotNetCliToolchainBuilder RuntimeIdentifier(string newRuntimeIdentifier)
Parameters
newRuntimeIdentifier
stringif not provided, portable OS-arch will be used (example: "win-x64", "linux-x86")
Returns
TargetFrameworkMoniker(string)
public CustomDotNetCliToolchainBuilder TargetFrameworkMoniker(string targetFrameworkMoniker)
Parameters
targetFrameworkMoniker
stringTFM, example: netcoreapp2.1
Returns
ToToolchain()
public abstract IToolchain ToToolchain()
Returns
UseNuGetClearTag(bool)
emits clear tag in the auto-generated NuGet.config file
public CustomDotNetCliToolchainBuilder UseNuGetClearTag(bool value)
Parameters
value
bool
Returns
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