AperiodicCode.SourceGenerators.FeatureManagement 1.0.0-next.2

This is a prerelease version of AperiodicCode.SourceGenerators.FeatureManagement.
dotnet add package AperiodicCode.SourceGenerators.FeatureManagement --version 1.0.0-next.2                
NuGet\Install-Package AperiodicCode.SourceGenerators.FeatureManagement -Version 1.0.0-next.2                
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="AperiodicCode.SourceGenerators.FeatureManagement" Version="1.0.0-next.2">
  <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 AperiodicCode.SourceGenerators.FeatureManagement --version 1.0.0-next.2                
#r "nuget: AperiodicCode.SourceGenerators.FeatureManagement, 1.0.0-next.2"                
#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 AperiodicCode.SourceGenerators.FeatureManagement as a Cake Addin
#addin nuget:?package=AperiodicCode.SourceGenerators.FeatureManagement&version=1.0.0-next.2&prerelease

// Install AperiodicCode.SourceGenerators.FeatureManagement as a Cake Tool
#tool nuget:?package=AperiodicCode.SourceGenerators.FeatureManagement&version=1.0.0-next.2&prerelease                

AperiodicCode.SourceGenerators.FeatureManagement

Generates constants based on features defined in appsettings.json.

Pre-requisites

Must include the following in your project file:

<ItemGroup>
    <AdditionalFiles Include="appsettings.json" />
</ItemGroup>

Example

Input appsettings.json:

{
  "FeatureManagement": {
    "TestFeature1": true,
    "TestFeature2": false
  }
}

Output:

public static class FeatureConstants
{
    public const string TestFeature1 = "TestFeature1";
    public const string TestFeature2 = "TestFeature2";
}

Limitations

Only works with appsettings.json currently. Does not support other files (like appsettings.{Environment}.json).

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-next.2 1,840 7/21/2023
1.0.0-next.1 97 7/21/2023