Seekatar.Tools 0.2.4

There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Seekatar.Tools --version 0.2.4
                    
NuGet\Install-Package Seekatar.Tools -Version 0.2.4
                    
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="Seekatar.Tools" Version="0.2.4" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Seekatar.Tools" Version="0.2.4" />
                    
Directory.Packages.props
<PackageReference Include="Seekatar.Tools" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Seekatar.Tools --version 0.2.4
                    
#r "nuget: Seekatar.Tools, 0.2.4"
                    
#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.
#:package Seekatar.Tools@0.2.4
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Seekatar.Tools&version=0.2.4
                    
Install as a Cake Addin
#tool nuget:?package=Seekatar.Tools&version=0.2.4
                    
Install as a Cake Tool

Seekatar's .NET Tools

This repo contains various .NET tools for .NET 6+

.NET codecov

Install

Installing from the NuGet.org

dotnet add package Seekatar.Tools

Configuration Extension For Devs

This set of configuration extension methods adds a low-priority JSON settings file to the IConfiguration sources for sharing configuration across projects. It easier way to share configuration and secrets as opposed launchSettings.json or Visual Studio's User Secrets. By looking up the folder structure, it allows you to share configuration across projects, and avoid committing them to a repo. There are different extension methods to cover the different types of apps:

  • Console (top-level or not)
  • .NET 8 ASP.NET with Controllers
  • .NET 8 Minimal API

By default, it looks for a file named shared.appsettings.Development.json in the binaries' folder, then marches up the folder structure looking for one until it finds it. It's useful to put one of these in a higher-level folder so multiple projects can find it. For example, for client/server apps you can put the JSON file above both project folders so they can share the configuration.

Note by default it is installed as the lowest priority configuration source so higher ones like appsettings.json and the environment will override them. If you want it highest, simply call AddJsonFile(GetSharedSettingsPath()) as the last source.

Set Environment Variables -- IMPORTANT

This is a development-only feature. It will only read the file if one of these environment variables is set to 'Development'. I usually set ASPNETCORE_ENVIRONMENT at the machine level so it is always set.

  • ASPNETCORE_ENVIRONMENT="Development" (set by default for ASP.NET apps)
  • DOTNET_ENVIRONMENT="Development"
  • NETCORE_ENVIRONMENT="Development"

Using in a Console App

Usually in a console app, you control the creation of the configuration. This code puts it as the lowest priority by adding it first.

        var configuration = new ConfigurationBuilder()
                       .AddSharedDevSettings()
                       .AddJsonFile("appsettings.json", true, true)
                       .AddEnvironmentVariables()
                       .Build();

Using in ASP.NET App

In main.cs simply add InsertSharedDevSettings to add it as the lowest priority.

using Seekatar.Tools;
...

        public static void Main(string[] args)
        {
            CreateHostBuilder(args)
                .InsertSharedDevSettings()
                .Build()
                .Run();
        }

Using in ASP.NET Minimal API App

In program.cs simply add InsertSharedDevSettings to add it after creating the builder.

using Seekatar.Tools;

var builder = WebApplication.CreateBuilder(args);

builder.Configuration.InsertSharedDevSettings();

Parameters

Each of the extension methods takes the following parameters with default values (which are passed to the JSON source):

Name Default Description
fileName shared.appsettings.Development.json Name of file to load
reloadOnChange false If true reloads the settings when the file changes

ObjectFactory

ObjectFactory discovers derived Types and allows them to be created later.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
0.2.4.79-prerelease 152 10/17/2025
0.2.4 23,085 10/17/2025
0.2.3.77-prerelease 207 10/13/2025
0.2.3.76-prerelease 183 10/13/2025
0.2.3.75-prerelease 197 10/13/2025
0.2.3 239 10/13/2025
0.2.2.73-prerelease 166 12/5/2024
0.2.2.72-prerelease 166 12/5/2024
0.2.2 8,277 12/5/2024
0.2.1 293 9/13/2024
0.2.0 289 8/18/2024
0.1.5 251 9/13/2024
0.1.4 22,279 8/12/2024
0.1.3 91,566 11/7/2022
0.1.3-prerelease 292 11/7/2022
0.1.2 474 11/7/2022
0.1.1 628 3/6/2022
0.1.0 629 2/15/2022