FileBasedApp 0.1.0

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

FileBasedApp

A base library for building file-based applications with dependency injection and configuration support.

Features

  • Base classes for building file-based applications
  • Integrated dependency injection using Microsoft.Extensions.DependencyInjection
  • Configuration support with JSON files
  • Built-in logging with console output
  • Support for both synchronous and asynchronous applications

Installation

Install the NuGet package:

dotnet add package FileBasedApp

Usage

Synchronous Application

using FileBasedApp;

public class MyApp : FileBasedApplication
{
    public override void SetupServices()
    {
        // Configure your services here
        base.SetupServices();
    }

    public override void Run()
    {
        // Your application logic here
    }
}

// Usage example:
public static void Main(string[] args)
{
    var app = new MyApp();
    app.Build().ConfigureServices();
    app.Run();
}

Asynchronous Application

using FileBasedApp;

public class MyAsyncApp : AsyncFileBasedApplication
{
    public override void SetupServices()
    {
        // Configure your services here
        base.SetupServices();
    }

    public override async Task Run()
    {
        // Your asynchronous application logic here
    }
}

// Usage example:
public static async Task Main(string[] args)
{
    var app = new MyAsyncApp();
    app.Build().ConfigureServices();
    await app.Run();
}

Publishing to NuGet

This project is configured to automatically publish to NuGet.org using GitHub Actions.

Prerequisites

  1. A NuGet.org API key stored as a GitHub secret named NUGET_API_KEY

Publishing a New Version

  1. Create a new tag with the version number (e.g., v1.0.0)
  2. Push the tag to GitHub
  3. Create a GitHub release from the tag
  4. The package will be automatically built and published to NuGet.org
git tag v1.0.0
git push origin v1.0.0
# Then create a release on GitHub
Option 2: Manual Workflow Dispatch
  1. Go to the Actions tab in GitHub
  2. Select the "Publish to NuGet" workflow
  3. Click "Run workflow"
  4. Enter the version number (e.g., 1.0.0)
  5. Click "Run workflow"

Building Locally

dotnet restore FileBasedApp/FileBasedApp.csproj
dotnet build FileBasedApp/FileBasedApp.csproj -c Release
dotnet pack FileBasedApp/FileBasedApp.csproj -c Release -o ./artifacts

License

MIT

Product Compatible and additional computed target framework versions.
.NET net10.0 is compatible.  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.1.2 444 11/19/2025
0.1.1 343 11/17/2025
0.1.0 340 11/17/2025