Linkoid.Build.Tasks.RunSettings 1.0.3

dotnet add package Linkoid.Build.Tasks.RunSettings --version 1.0.3                
NuGet\Install-Package Linkoid.Build.Tasks.RunSettings -Version 1.0.3                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Linkoid.Build.Tasks.RunSettings" Version="1.0.3">
  <PrivateAssets>all</PrivateAssets>
  <IncludeAssets>runtime; build; native; contentfiles; analyzers</IncludeAssets>
</PackageReference>                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Linkoid.Build.Tasks.RunSettings --version 1.0.3                
#r "nuget: Linkoid.Build.Tasks.RunSettings, 1.0.3"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Linkoid.Build.Tasks.RunSettings as a Cake Addin
#addin nuget:?package=Linkoid.Build.Tasks.RunSettings&version=1.0.3

// Install Linkoid.Build.Tasks.RunSettings as a Cake Tool
#tool nuget:?package=Linkoid.Build.Tasks.RunSettings&version=1.0.3                

Run Settings Build Tasks

Provides MSBuild tasks for generating .runsettings files.

Available on NuGet.

Usage

Add Linkoid.Build.Tasks.RunSettings as a package reference in the project file.

<ItemGroup>
  <PackageReference Include="Linkoid.Build.Tasks.RunSettings" Version="1.0.0" />
</ItemGroup>

Adding Attributes

Add elements for the .runsettings file using <RunSettingElements> items.

  • The item's Include= value specifies the path to the target parent of all the elements.
  • The item's metadata specifies the child elements.
<ItemGroup>
  <RunSettingElements Include="RunConfiguration">
    <ResultsDirectory>.\TestResults</ResultsDirectory>
    <TargetFrameworkVersion>$(TargetFramework)</TargetFrameworkVersion>
  </RunSettingElements>
</ItemGroup>

Adding Attributes

Add attributes to an element using <RunSettingAttributes> items.

  • The item's Include= value specifies the path to the target element to add the attributes to.
  • The item's metadata specifies the attributes.
<ItemGroup>
  <RunSettingAttributes Include="LoggerRunSettings/Loggers/Logger" >
    <friendlyName>console</friendlyName>
    <enabled Condition="'$(Configuration)' == 'Debug'">true</enabled>
    <enabled Condition="'$(Configuration)' == 'Release'">false</enabled>
  </RunSettingAttributes>
</ItemGroup>

Generated File

The location and name of the generated .runsettings file is determined by the <RunSettingsFilePath> MSBuild property, and defaults to .runsettings in the project directory.

A generated .runsettings file can be edited. Elements and attributes found in an existing .runsettings file will be preserved when regenerating the file or overwritten if it is an element or attribute defined in the project file.

Below is the .runsettings file generated with the items defined in the examples above.

<?xml version="1.0" encoding="utf-8"?>

<RunSettings>
  <RunConfiguration>
    <ResultsDirectory>.\TestResults</ResultsDirectory>
    <TargetFrameworkVersion>net6.0</TargetFrameworkVersion>
  </RunConfiguration>
  <LoggerRunSettings>
    <Loggers>
      <Logger enabled="true" friendlyName="console" />
    </Loggers>
  </LoggerRunSettings>
</RunSettings>
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

  • .NETStandard 2.0

    • No dependencies.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on Linkoid.Build.Tasks.RunSettings:

Package Downloads
Linkoid.LethalCompany.Test.Build

Provides MSBuild properties and targets for building and running a Lethal Company plugin.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.3 211 9/18/2024
1.0.2 118 9/17/2024
1.0.1 97 9/12/2024
1.0.0 98 9/10/2024