dotnet

package
v0.0.0-...-0d89779 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 20, 2025 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cli

type Cli struct {
	// contains filtered or unexported fields
}

func NewCli

func NewCli(commandRunner exec.CommandRunner) *Cli

func (*Cli) Build

func (cli *Cli) Build(ctx context.Context, project string, configuration string, output string) error

func (*Cli) CheckInstalled

func (cli *Cli) CheckInstalled(ctx context.Context) error

func (*Cli) GetMsBuildProperty

func (cli *Cli) GetMsBuildProperty(ctx context.Context, project string, propertyName string) (string, error)

GetMsBuildProperty uses -getProperty to fetch a property after evaluation, without executing the build.

This only works for versions dotnet >= 8, MSBuild >= 17.8. On older tool versions, this will return an error.

func (*Cli) InitializeSecret

func (cli *Cli) InitializeSecret(ctx context.Context, project string) error

func (*Cli) InstallUrl

func (cli *Cli) InstallUrl() string

func (*Cli) IsAspireHostProject

func (cli *Cli) IsAspireHostProject(ctx context.Context, projectPath string) (bool, error)

IsAspireHostProject returns true if the project at the given path has an MS Build Property named "IsAspireHost" which is set to true or has a ProjectCapability named "Aspire".

func (*Cli) Name

func (cli *Cli) Name() string

func (*Cli) Publish

func (cli *Cli) Publish(ctx context.Context, project string, configuration string, output string) error

func (*Cli) PublishAppHostManifest

func (cli *Cli) PublishAppHostManifest(
	ctx context.Context, hostProject string, manifestPath string, dotnetEnv string,
) error

func (*Cli) PublishContainer

func (cli *Cli) PublishContainer(
	ctx context.Context, project, configuration, imageName, server, username, password string,
) (int, error)

PublishContainer runs a `dotnet publish“ with `/t:PublishContainer`to build and publish the container. It also gets port number by using `--getProperty:GeneratedContainerConfiguration`.

func (*Cli) Restore

func (cli *Cli) Restore(ctx context.Context, project string) error

func (*Cli) SetSecrets

func (cli *Cli) SetSecrets(ctx context.Context, secrets map[string]string, project string) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL