Shiny.Extensions.Configuration 1.1.1

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

Xamarin Configuration for Microsoft.Extensions.Configuration

Nugets

Release NuGet
Stable Nuget
Preview Nuget (with prereleases)

Builds

Branch Status
Master Build
Dev Build
Preview Build

Features

  • All the power of IConfiguration
  • Load JSON from packaged sources (whitelabellers can unpack, edit, & repack the config)
  • Preferences based configuration source with writebacks
  • Support For
    • Xamarin
      • iOS
      • Android
      • Including Xamarin Forms 😛
    • .NET 6
      • Android
      • iOS
      • Including MAUI 😛

The Problem

Microsoft really did create a great set of abstractions for configuration. You can store a set of key/values, cause a reload when a configuration source changes, & bind to strongly typed objects using Microsoft.Extensions.Configuration.Binder. On Mobile though, NONE of the current providers aren't really well.

Why?

  • A big feature for IConfiguration, is the ability to trigger a reload of it's source without restarting the application. Changing an appsettings.json file during runtime causes the IConfiguration to trigger a reload notification.
  • Mobile doesn't really have an appsettings.json. Sure you could put this in an embedded resource, but than it is readonly at all times other than the build process... after that - it is locked in place
  • Essentially, IConfiguration becomes a string based dictionary for all intents and purposes - pretty useless considering

The Solution

How Shiny.Extensions.Configuration brings the power of IConfiguration to Mobile!

  • A platform preferences configuration source which allows you to WRITE a value back using IConfiguration[key] = value;
  • A whitelabellers dream - the ability to unpack, change a json config file, and repack without trigger a build by using proper platform directories to load up the JSON files while still having the power of a proper configuration library internally.

Setup

AppSettings JSON
  1. Install the NuGet package 'Shiny.Extensions.Configuration'
  2. Create an appsettings.json file like you would in ASP.NET Core application in your HEAD project.
    • ANDROID: place the file in: Assets. Ensure the build action on the file is set to 'AndroidAsset'
    • iOS: place the file in the ROOT of your project. Ensure the build action on the file is set to 'BundleResource'
  3. Configure your IConfiguration using the following code in your application startup code (ie. Xamarin.Forms App).
// store this in your dependency injection container OR static class
var config = new ConfigurationBuilder()
    .AddJsonPlatformBundle() // NOTE: you can change the name of appsettings.json to something else and pass as an argument here
    .Build();
Preferences Provider

This provider allows writes and persists across application restarts. It is a wrapper around the Android/iOS shared preferences.

  1. Install the NuGet package 'Shiny.Extensions.Configuration'
  2. For this configuration source, nothing special is required, simply add the following to the configuration builder:
var configuration = new ConfigurationBuilder()
    .AddPlatformPreferences()
    .Build();

NOTE: with the platform preferences provider, changes are supported.

IConfiguration config = ...; // build
config["key"] = "value"; // write - this will cause a persist to the platform prefs and also trigger Option reloated events
Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-android31.0 is compatible.  net6.0-ios was computed.  net6.0-ios15.2 is compatible.  net6.0-maccatalyst was computed.  net6.0-maccatalyst15.2 is compatible.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 was computed.  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. 
.NET Core netcoreapp2.0 was computed.  netcoreapp2.1 was computed.  netcoreapp2.2 was computed.  netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.0 is compatible.  netstandard2.1 was computed. 
.NET Framework net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  net48 was computed.  net481 was computed. 
MonoAndroid monoandroid was computed.  monoandroid12.0 is compatible. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen40 was computed.  tizen60 was computed. 
Xamarin.iOS xamarinios was computed.  xamarinios10 is compatible. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
4.0.0-beta-0095 237 10/28/2025
4.0.0-beta-0093 183 9/21/2025
4.0.0-beta-0092 308 9/17/2025
4.0.0-beta-0091 183 8/18/2025
4.0.0-beta-0086 218 6/23/2025
4.0.0-beta-0084 182 6/4/2025
4.0.0-beta-0083 171 6/3/2025
4.0.0-beta-0081 98 5/30/2025
4.0.0-beta-0079 198 5/29/2025
4.0.0-beta-0075 129 5/24/2025
4.0.0-beta-0069 259 4/8/2025
4.0.0-beta-0061 189 4/3/2025
4.0.0-beta-0057 191 4/1/2025
4.0.0-beta-0055 164 3/27/2025
4.0.0-beta-0054 509 3/26/2025
4.0.0-beta-0049 123 3/21/2025
4.0.0-beta-0048 134 3/21/2025
4.0.0-beta-0047 190 3/20/2025
4.0.0-beta-0040 3,999 6/14/2024
3.4.0-beta-0010 223 3/6/2025
3.4.0-beta-0009 132 2/5/2025
3.4.0-beta-0006 120 2/4/2025
3.4.0-beta-0005 128 2/4/2025
3.4.0-beta-0003 138 2/4/2025
3.3.4 9,979 1/15/2025
3.3.3 14,179 4/8/2024
3.3.3-beta-0007 154 4/8/2024
3.3.3-beta-0003 137 4/8/2024
3.3.2 377 3/26/2024
3.3.1 216 3/26/2024
3.3.0 322 3/18/2024
3.3.0-beta-0011 149 3/14/2024
3.3.0-beta-0009 162 3/12/2024
3.3.0-beta-0003 168 2/28/2024
3.2.4 1,840 2/3/2024
3.2.4-beta-0004 135 2/3/2024
3.2.4-beta-0002 138 2/2/2024
3.2.3 298 1/19/2024
3.2.2 802 1/3/2024
3.2.1 1,291 12/20/2023
3.2.0 384 12/11/2023
3.2.0-beta-0049 129 1/12/2024
3.2.0-beta-0042 166 1/3/2024
3.2.0-beta-0041 128 1/3/2024
3.2.0-beta-0034 140 12/20/2023
3.2.0-beta-0025 162 12/10/2023
3.2.0-beta-0022 179 11/29/2023
3.2.0-beta-0019 162 11/25/2023
3.2.0-beta-0010 175 11/11/2023
3.2.0-beta-0006 154 11/8/2023
3.1.2 844 11/8/2023
3.1.1 275 11/2/2023
3.1.0 587 10/27/2023
3.1.0-beta-0018 156 11/2/2023
3.1.0-beta-0007 177 10/17/2023
3.1.0-beta-0005 171 10/14/2023
3.1.0-beta-0004 152 10/14/2023
3.0.1 721 9/20/2023
3.0.1-beta-0016 165 9/20/2023
3.0.1-beta-0002 199 9/14/2023
3.0.0 811 9/5/2023
3.0.0-beta-0305 207 9/1/2023
3.0.0-beta-0301 189 8/31/2023
3.0.0-beta-0300 210 8/31/2023
3.0.0-beta-0296 199 8/28/2023
3.0.0-beta-0293 205 8/28/2023
3.0.0-beta-0292 198 8/28/2023
3.0.0-beta-0282 198 8/25/2023
3.0.0-beta-0277 233 8/20/2023
3.0.0-beta-0273 202 8/20/2023
3.0.0-beta-0257 218 8/15/2023
3.0.0-beta-0245 246 8/8/2023
3.0.0-beta-0241 426 7/31/2023
3.0.0-beta-0231 215 7/25/2023
3.0.0-beta-0230 219 7/25/2023
3.0.0-beta-0215 244 7/18/2023
3.0.0-beta-0210 465 7/12/2023
3.0.0-beta-0200 233 7/5/2023
3.0.0-beta-0199 236 7/5/2023
3.0.0-beta-0179 460 6/27/2023
3.0.0-beta-0174 242 6/26/2023
3.0.0-beta-0165 237 6/22/2023
3.0.0-beta-0154 250 6/17/2023
3.0.0-beta-0153 241 6/16/2023
3.0.0-beta-0124 649 6/1/2023
3.0.0-beta-0122 351 5/31/2023
3.0.0-beta-0116 225 5/30/2023
3.0.0-beta-0114 245 5/29/2023
3.0.0-beta-0092 288 5/16/2023
3.0.0-beta-0081 243 5/13/2023
3.0.0-beta-0073 233 5/12/2023
3.0.0-beta-0039 262 5/7/2023
3.0.0-beta-0031 247 5/5/2023
3.0.0-beta-0026 294 4/28/2023
3.0.0-beta-0023 250 4/26/2023
3.0.0-beta-0015 268 4/22/2023
3.0.0-beta-0001 375 4/14/2023
3.0.0-alpha-0608 231 4/13/2023
3.0.0-alpha-0604 235 4/13/2023
3.0.0-alpha-0593 311 4/7/2023
3.0.0-alpha-0560 1,286 3/28/2023
3.0.0-alpha-0557 244 3/27/2023
3.0.0-alpha-0552 245 3/26/2023
3.0.0-alpha-0550 249 3/25/2023
3.0.0-alpha-0548 247 3/25/2023
3.0.0-alpha-0545 245 3/25/2023
3.0.0-alpha-0543 260 3/24/2023
3.0.0-alpha-0540 243 3/24/2023
3.0.0-alpha-0533 4,452 3/14/2023
3.0.0-alpha-0532 247 3/12/2023
3.0.0-alpha-0530 339 3/6/2023
3.0.0-alpha-0523 292 3/1/2023
3.0.0-alpha-0516 254 2/27/2023
3.0.0-alpha-0513 222 2/26/2023
3.0.0-alpha-0497 220 2/23/2023
3.0.0-alpha-0496 758 2/4/2023
3.0.0-alpha-0495 758 1/12/2023
3.0.0-alpha-0491 462 12/24/2022
3.0.0-alpha-0489 261 12/23/2022
3.0.0-alpha-0470 266 12/15/2022
3.0.0-alpha-0427 369 12/4/2022
3.0.0-alpha-0423 265 12/1/2022
3.0.0-alpha-0402 414 11/19/2022
3.0.0-alpha-0399 338 11/12/2022
3.0.0-alpha-0396 253 11/12/2022
3.0.0-alpha-0392 304 10/29/2022
3.0.0-alpha-0391 266 10/27/2022
3.0.0-alpha-0387 418 10/25/2022
3.0.0-alpha-0384 288 10/25/2022
3.0.0-alpha-0376 271 10/7/2022
3.0.0-alpha-0370 278 10/4/2022
3.0.0-alpha-0360 244 10/3/2022
3.0.0-alpha-0354 283 10/1/2022
3.0.0-alpha-0348 303 9/26/2022
3.0.0-alpha-0344 271 9/25/2022
3.0.0-alpha-0343 260 9/24/2022
3.0.0-alpha-0338 276 9/22/2022
3.0.0-alpha-0329 250 9/20/2022
3.0.0-alpha-0310 312 9/3/2022
3.0.0-alpha-0283 265 8/24/2022
3.0.0-alpha-0266 304 8/13/2022
3.0.0-alpha-0245 285 8/10/2022
3.0.0-alpha-0225 291 8/9/2022
3.0.0-alpha-0216 272 8/7/2022
3.0.0-alpha-0208 283 8/5/2022
3.0.0-alpha-0204 264 7/31/2022
3.0.0-alpha-0181 272 7/25/2022
3.0.0-alpha-0172 263 7/22/2022
3.0.0-alpha-0167 303 7/19/2022
3.0.0-alpha-0160 284 7/18/2022
3.0.0-alpha-0158 268 7/18/2022
3.0.0-alpha-0157 288 7/17/2022
3.0.0-alpha-0156 271 7/16/2022
3.0.0-alpha-0155 287 7/15/2022
3.0.0-alpha-0142 261 7/14/2022
3.0.0-alpha-0128 318 6/16/2022
3.0.0-alpha-0102 287 6/6/2022
3.0.0-alpha-0099 283 6/2/2022
3.0.0-alpha-0090 289 5/25/2022
3.0.0-alpha-0087 282 5/24/2022
3.0.0-alpha-0084 276 5/24/2022
3.0.0-alpha-0082 293 5/23/2022
3.0.0-alpha-0079 277 5/21/2022
3.0.0-alpha-0075 296 5/20/2022
1.1.1 8,693 3/3/2022
1.0.0 330 5/27/2023