SetOMatic 1.0.0.14

There is a newer version of this package available.
See the version list below for details.
dotnet add package SetOMatic --version 1.0.0.14
                    
NuGet\Install-Package SetOMatic -Version 1.0.0.14
                    
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="SetOMatic" Version="1.0.0.14" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="SetOMatic" Version="1.0.0.14" />
                    
Directory.Packages.props
<PackageReference Include="SetOMatic" />
                    
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 SetOMatic --version 1.0.0.14
                    
#r "nuget: SetOMatic, 1.0.0.14"
                    
#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 SetOMatic@1.0.0.14
                    
#: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=SetOMatic&version=1.0.0.14
                    
Install as a Cake Addin
#tool nuget:?package=SetOMatic&version=1.0.0.14
                    
Install as a Cake Tool

Set-O-Matic

Simple strongly-typed settings manager

About Set-O-Matic

As Visual Studio has evolved, the built-in SettingsManager library has fallen far behind in functionality. While nearly all other aspects of code development have been integrated into Intellisense and have become strongly-typed, application settings are still only accessible by default as strings which are not visible via Intellisense.

Set-O-Matic is a simple set of T4 templates that, when added to any .Net Framework project, automatically creates a strongly-typed Settings class that is dynamically loaded with values from App.config or Web.config at runtime.

Why use Set-O-Matic?

  • Strongly-typed application settings help prevent runtime errors by allowing the compiler to check the types at compile time
  • As .Net class properties, all settings are available in IntelliSense at design-time, making errors less likely
  • Values in the config file are type-checked at first setting access time, preventing invalid settings from falling through the cracks at runtime
  • Connection strings are automatically available through the Settings object
  • Compiler-checked code is cleaner code. Help the compiler help you!

Features

  • Extremely lightweight. Set-O-Matic adds a single folder and two code files (< 200 kb)
  • Completely Automates the importing of all configuration settings into a strongly typed Settings static class
  • Automatically loads the current configuration file setting values at runtime into the Settings object
  • Setting types are inferred automaically from their values (e.g. "true" becomes bool and "01/01/2025" becomes DateTime)
  • Allows the use of IntelliSense to reference all application settings
  • Provides a connectionString child class(es) making all connection strings available via the Settings class
  • Seamlessly handles transformed config files since values are loaded at runtime
  • Type-checking at application startup makes it easy to catch invalid values
  • Having strongly typed settings eliminates the need to cast settings throughout the application to match the type they are being used for
  • The ability to select any setting from IntelliSense greatly reduces the chances of "fat-finger" errors when referencing a setting
  • No dependencies to be deployed. All necessary functionality is included in complied application file (.exe)
  • Overall robustness of application code is increased due to fewer opportunities for errors Examples:

<add name="Active" value="true"> becomes public bool Active {get; set;}

<add name="CutoffDate" value="01/01/2025"> becomes public DateTime CutoffDate {get; set;}

Detailed Set-O-Matic ReadMe.md

There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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
1.0.0.17 89 8/14/2025
1.0.0.16 92 8/14/2025
1.0.0.14 93 8/13/2025
1.0.0.12 181 8/11/2025 1.0.0.12 is deprecated because it has critical bugs.
1.0.0.11 92 8/11/2025
1.0.0.10 94 8/8/2025
1.0.0.9 170 8/6/2025

* Updated static constructor logic to be more efficient
* Reformatted generated code