Skip to content

A .NET Generic Host Builder for running CS2 Dedicated Servers.

License

Notifications You must be signed in to change notification settings

Cryptoc1/cs2-launcher

Repository files navigation

CS2 Launcher

Language Checks

A .NET Generic Host Builder for running CS2 Dedicated Servers.

CS2Launcher.AspNetCore.App Version
CS2Launcher.AspNetCore.Launcher Version

Getting Started

  • Create a new console project
dotnet new console -n {launcher-name}
  • Update the project to target the Web Sdk
<Project Sdk="Microsoft.NET.Sdk.Web">
    <!-- ... -->
</Project>
  • Add a reference to CS2Launcher.AspNetCore.Launcher
dotnet add package CS2Launcher.AspNetCore.Launcher
  • Update the Program.cs
using CS2Launcher.AspNetCore.Launcher;

var builder = CS2LauncherApplication.CreateBuilder( args );

await using var app = builder.Build();
await app.RunAsync();
  • Update the Server configuration
{
    "Server": {
        "ProcessPriority": "Normal",
        "Program": "C:\\SteamLibrary\\steamapps\\common\\Counter-Strike Global Offensive\\game\\bin\\win64\\cs2.exe",
        "RconPassword": "test",
        "RedirectOutput": "false",
        "WorkshopMapIds": [3070280193]
    }
}

Need a proper example? Checkout the sample project.

About

A .NET Generic Host Builder for running CS2 Dedicated Servers.

Topics

Resources

License

Stars

Watchers

Forks