Table of Contents

Class DotnetRunOptions

Namespace
Invex.Atom.Module.Dotnet.Cli
Assembly
Invex.Atom.Module.Dotnet.dll
public sealed record DotnetRunOptions
Inheritance
object
DotnetRunOptions

Constructors

DotnetRunOptions()

public DotnetRunOptions()

Properties

Arch

The target architecture.

public string? Arch { get; init; }

Property Value

string

ArtifactsPath

The artifacts path. All output from the project, including build, publish, and pack output, will go in subfolders under the specified path.

public string? ArtifactsPath { get; init; }

Property Value

string

Configuration

The configuration to run for. The default for most projects is 'Debug'.

public string? Configuration { get; init; }

Property Value

string

DisableBuildServers

Force the command to ignore any persistent build servers.

public bool? DisableBuildServers { get; init; }

Property Value

bool?

Environment

Sets the value of an environment variable. Creates the variable if it does not exist, overrides if it does. This argument can be specified multiple times to provide multiple variables.

Examples: -e VARIABLE=abc -e VARIABLE="value with spaces" -e VARIABLE="value;seperated with;semicolons" -e VAR1=abc -e VAR2=def -e VAR3=ghi

public IReadOnlyDictionary<string, string>? Environment { get; init; }

Property Value

IReadOnlyDictionary<string, string>

File

The path to the file-based app to run (can be also passed as the first argument if there is no project in the current directory).

public string? File { get; init; }

Property Value

string

Framework

The target framework to run for. The target framework must also be specified in the project file.

public string? Framework { get; init; }

Property Value

string

Interactive

Allows the command to stop and wait for user input or action (for example to complete authentication).

public bool? Interactive { get; init; }

Property Value

bool?

LaunchProfile

The name of the launch profile (if any) to use when launching the application.

public string? LaunchProfile { get; init; }

Property Value

string

NoBuild

Do not build the project before running. Implies --no-restore.

public bool? NoBuild { get; init; }

Property Value

bool?

NoCache

Skip up to date checks and always build the program before running.

public bool? NoCache { get; init; }

Property Value

bool?

NoLaunchProfile

Do not attempt to use launchSettings.json or [app].run.json to configure the application.

public bool? NoLaunchProfile { get; init; }

Property Value

bool?

NoRestore

Do not restore the project before building.

public bool? NoRestore { get; init; }

Property Value

bool?

NoSelfContained

Publish your application as a framework dependent application. A compatible .NET runtime must be installed on the target machine to run your application.

public bool? NoSelfContained { get; init; }

Property Value

bool?

Os

The target operating system.

public string? Os { get; init; }

Property Value

string

Project

The path to the project file to run (defaults to the current directory if there is only one project).

public string? Project { get; init; }

Property Value

string

Property

public IReadOnlyDictionary<string, string>? Property { get; init; }

Property Value

IReadOnlyDictionary<string, string>

Runtime

The target runtime to run for.

public string? Runtime { get; init; }

Property Value

string

SelfContained

Publish the .NET runtime with your application so the runtime doesn't need to be installed on the target machine. The default is 'false.' However, when targeting .NET 7 or lower, the default is 'true' if a runtime identifier is specified.

public bool? SelfContained { get; init; }

Property Value

bool?

Verbosity

Set the MSBuild verbosity level. Allowed values are q[uiet], m[inimal], n[ormal], d[etailed], and diag[nostic].

public VerbosityOptions? Verbosity { get; init; }

Property Value

VerbosityOptions?

Methods

ToArguments()

Converts these options to individual command-line arguments, in schema order.

public IReadOnlyList<string> ToArguments()

Returns

IReadOnlyList<string>

The arguments. Each option name and each value is a separate element, so values need no quoting.