MySQL: Online
Load: Low
Sandbox: Ready

Installing Metamod & CounterStrikeSharp on Your CS2 Server

CounterStrikeSharp plugins can't run on their own. They need Metamod:Source as a bridge between the game engine and CounterStrikeSharp itself, and CounterStrikeSharp as the runtime that actually loads and runs your C# plugin. This guide walks through installing both on a CS2 dedicated server, from a clean install to your first working plugin.

1

What you'll need

A working CS2 dedicated server, with SSH or FTP access to its files. If you don't have a server yet, our hosting partner can set one up for you.

Get a CS2 server
2

Download Metamod:Source

Metamod:Source is the plugin loader Counter-Strike 2 doesn't have built in. CounterStrikeSharp depends on it completely. Download the current dev build for your server's operating system.

Download Metamod:Source
3

Extract Metamod into your server

Extract the archive and copy its addons/ folder into your game's csgo/ folder. Usually server/game/csgo/ on your server.

4

Edit gameinfo.gi

Open server/game/csgo/gameinfo.gi and find the line Game_LowViolence csgo_lv. Add a new line right underneath it, exactly as highlighted below:

"GameInfo"
{
    game        "Counter-Strike 2"
    title       "Counter-Strike 2"

    FileSystem
    {
        SearchPaths
        {
            Game_LowViolence    csgo_lv
            Game    csgo/addons/metamod
            Game    csgo
            Game    csgo_core
        }
    }
}
5

Download CounterStrikeSharp

CounterStrikeSharp is what actually loads your compiled .dll plugins. On Linux you may also need to install libicu (or icu-libs / libicu-dev, depending on your distro) through your package manager. On Windows you'll need the Visual C++ Redistributables installed.

First install? You MUST download the "With Runtime" build. The regular build doesn't include the .NET runtime CounterStrikeSharp needs to run.
Download CounterStrikeSharp
6

Extract CounterStrikeSharp

Extract it and copy its addons/ folder into the same server/game/csgo/ folder. It merges alongside Metamod's own files.

7

Restart your server and verify

Restart your CS2 server, then type meta list in the server console. You should see CounterStrikeSharp listed as a loaded plugin:

meta list
Listing 1 plugin:
  [01] CounterStrikeSharp (0.1.0) by Roflmuffin
8

Here's how your server structure should look now

Before installing your first plugin, your addons/ folder should look like this:

addons
counterstrikesharp
api
bin
dotnet
plugins
gamedata
metamod
bin
counterstrikesharp.vdf
metaplugins.ini
README.txt
metamod.vdf
metamod_x64.vdf
9

Find a plugin to install

Search for a CounterStrikeSharp plugin you'd like to use. GitHub is the most common place to find them. Download its source code as a .zip archive.

10

Prepare it for our compiler

Our compiler needs a .zip archive containing at least one .cs file and a matching .csproj file. Many plugin repositories already have these at the project root, so you can often zip the folder as-is. If the .csproj is missing or the files are nested differently, you'll need to restructure the archive yourself to match this layout:

YourPlugin.zip
YourPlugin.csproj
YourPlugin.cs
Any additional files
11

Compile it

Open our compiler, upload your prepared .zip, pick the CounterStrikeSharp version matching the one you installed on your server, and press Compile Now. Download the resulting .zip once it finishes. It contains your compiled .dll plus anything else your plugin needs.

Open the CS2Sharp Compiler
12

Install your plugin

Extract the .zip you downloaded into its own folder under server/game/csgo/addons/counterstrikesharp/plugins/. The folder name should match your plugin's name. CounterStrikeSharp only loads plugins sitting in their own named subfolder.

plugins
YourPlugin
YourPlugin.dll
Any additional files
13

Reload and confirm

Run css_plugins load YourPluginName from the server console (or simply restart the server), then check the console for your plugin's own load message. If meta list ever shows "Unknown Command", double-check that gameinfo.gi was edited correctly and that the folders were copied to the right place.

Was this tutorial useful?

3 users found this useful
Page generated in 0.019 seconds
CounterStrikeSharp Web Compiler V1.0 - Made with by RomaniaBarlap for the community.