An open API service indexing awesome lists of open source software.

https://github.com/cryptoc1/cs2-launcher

A .NET Generic Host Builder for running CS2 Dedicated Servers.
https://github.com/cryptoc1/cs2-launcher

cs2 dotnet

Last synced: 8 months ago
JSON representation

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

Awesome Lists containing this project

README

          

# CS2 Launcher

![Language](https://img.shields.io/github/languages/top/cryptoc1/cs2-launcher)
[![Checks](https://img.shields.io/github/checks-status/cryptoc1/cs2-launcher/develop)](https://github.com/Cryptoc1/cs2-launcher/actions/workflows/default.yml)

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

| | |
| --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------- |
| `CS2Launcher.AspNetCore.App` | [![Version](https://img.shields.io/nuget/vpre/CS2Launcher.AspNetCore.App)](https://www.nuget.org/packages/CS2Launcher.AspNetCore.App) |
| `CS2Launcher.AspNetCore.Launcher` | [![Version](https://img.shields.io/nuget/vpre/CS2Launcher.AspNetCore.Launcher)](https://www.nuget.org/packages/CS2Launcher.AspNetCore.Launcher) |

## Getting Started

- Create a new console project
```shell
dotnet new console -n {launcher-name}
```

- Update the project to target the Web Sdk
```xml

```

- Add a reference to `CS2Launcher.AspNetCore.Launcher`
```shell
dotnet add package CS2Launcher.AspNetCore.Launcher
```

- Update the `Program.cs`
```csharp
using CS2Launcher.AspNetCore.Launcher;

var builder = CS2LauncherApplication.CreateBuilder( args );

await using var app = builder.Build();
await app.RunAsync();
```

- Update the Server configuration
```json
{
"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](./sample) project.