.NET plugin (v2)

The .NET plugin (v2) builds .NET projects using the dotnet tool. It’s the successor to the .NET plugin.

Keys

This plugin provides the following unique keys.

Global flags

dotnet-configuration

Type: string

Default: "Release"

The .NET build configuration to use. Possible values are "Debug" and "Release".

dotnet-project

Type: string

The path to the solution or project file to build, relative to the root of the snap source. If a path isn’t specified, MSBuild will search the root of the source for a file with the .*proj or .sln extension.

dotnet-properties

Type: dict of strings to strings

A list of MSBuild properties to be appended to the restore, build, and publish commands in the format of -p:<Key>=<Value>.

dotnet-self-contained

Type: boolean

Default: False

Create a self-contained .NET application. The Runtime Identifier (RID) will be automatically set based on the $CRAFT_BUILD_FOR variable for a given build, such that: