TuskLang Logo PNT

TuskLang for
C#

Build modern, intelligent configurations for .NET applications. Leverage async/await, LINQ, and the .NET ecosystem directly from your config files.

NuGet
Package Manager
2min
Setup Time
.NET 6+
Runtime Version

Why C# Developers Love TuskLang

Replace static JSON configs with intelligent, async-ready configuration files that leverage C# and .NET power.

@

@ Operators for C#

Execute C# code, query databases, and leverage async/await directly from configuration files using powerful @ operators.

Entity FW

Database Integration

Native Entity Framework, Dapper, and ADO.NET support. Query your database directly from config files with full .NET integration.

.NET Ecosystem

Built for the .NET ecosystem. Native support for dependency injection, configuration providers, and hosting extensions.

ASP.NET & Blazor Integration

Drop-in integration for ASP.NET Core, Blazor, and other .NET frameworks. Configuration providers and middleware included.

Async/Await Ready

Built for modern C# with full async/await support. Non-blocking configuration loading and real-time updates.

xUnit

xUnit Testing

Built-in xUnit and NUnit support with test utilities and mocking frameworks for testing configurations and @ operators.

Modern Configuration

Traditional appsettings.json files are static. TuskLang configs are intelligent, async-ready .NET configurations.

  • 🔷 Native C# integration
  • ⚡ Async/await support
  • 🔗 LINQ integration
  • 🔄 Hot reloading
  • 📦 NuGet ready
config.tsk
# Smart C# Configuration
AppName: "MyCSharpApp"
Environment: @env("ASPNETCORE_ENVIRONMENT", "Development")

# Database with connection pooling
ConnectionStrings {
    DefaultConnection: @env("CONNECTION_STRING")
    PoolSize: @query("SELECT COUNT(*) FROM active_connections") + 5
    CommandTimeout: @optimize("command_timeout", 30)
}

# SignalR configuration
SignalR {
    HubUrl: @env("SIGNALR_HUB_URL", "/chathub")
    MaxConnections: @learn("optimal_connections", 1000)
    EnableDetailedErrors: @cache("1h", true)
}

# Logging with dynamic levels
Logging {
    LogLevel {
        Default: @env("ENVIRONMENT") === "Production" ? 
            "Warning" : "Debug"
    }
}

.NET Ecosystem Integration

Works seamlessly with your favorite .NET frameworks and libraries

ASP.NET Core

Web framework

Blazor

Web UI framework

Entity Framework

ORM framework

SignalR

Real-time communication

Orleans

Actor framework

MassTransit

Message bus framework

Get Started in Minutes

Install TuskLang for C# and start building modern, intelligent configurations

1 Install via dotnet CLI

dotnet add package TuskLang.CSharp

2 Create your configuration

# config.tsk
AppName: "MyCSharpApp"
Environment: @env("ASPNETCORE_ENVIRONMENT")

3 Load in your C# app

using TuskLang.CSharp;
var config = TuskConfig.Load("config.tsk");
Complete Guide View Examples