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.
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 serverDownload 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:SourceExtract 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.
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
}
}
}
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.
Extract CounterStrikeSharp
Extract it and copy its addons/ folder into the same server/game/csgo/ folder. It merges alongside Metamod's own files.
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
Here's how your server structure should look now
Before installing your first plugin, your addons/ folder should look like this:
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.
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:
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 CompilerInstall 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.
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?
Barlap for the community.