This is the SampStack-maintained downstream of ikkentim/SampSharp, originally created by Tim Potze and its contributors. It provides the .NET libraries and native open.mp component used to write gamemodes in C#.
The maintained 1.x line targets open.mp and .NET 10. Native components are built for Linux x64/ARM64,
Windows x64, and macOS Intel/Apple Silicon. The mutable dev release contains commit-specific
NuGet packages and native archives; stable versions are created only through the guarded manual
release workflow.
For questions about this downstream, file an issue in this repository.
The SampSharp .NET packages provided are available on NuGet.org and contain all API documentation.
For general documentation and guides, see https://sampsharp.net
Example gamemodes and sample projects are available at https://github.com/sampsharp/samples
Use the build scripts in the root to build components:
On Windows:
.\build.cmd component # Build open.mp component
.\build.cmd component publish # Build and publish open.mp component
.\build.cmd libraries # Build C# libraries
.\build.cmd libraries test # Test C# libraries
.\build.cmd libraries publish # Build and pack C# libraries
.\build.cmd clean # Clean build directory
On Linux or macOS:
./build.sh component # Build open.mp component
./build.sh component publish # Build and publish open.mp component
./build.sh libraries # Build C# libraries
./build.sh libraries test # Test C# libraries
./build.sh libraries publish # Build and pack C# libraries
./build.sh clean # Clean build directory
Artifacts are placed in build/artifacts/. Test result files are written to build/test-results/. Pass --no-build to skip rebuilding during tests and --version=<version> to set the CI package version.
Requirements:
- .NET SDK 10 (for building C# libraries)
- CMake 3.19+ (for building the open.mp component)
- Visual Studio 2026 with C++ workload (Windows)
- gcc/g++ and cmake (Linux:
gcc g++ cmake) - Apple Clang and CMake (macOS)
The component build discovers nethost from the installed .NET host pack for the active operating
system and architecture. Override it only when needed with
-DNETHOST_DIR=/path/to/runtimes/<rid>/native. Native CI covers Linux x64/ARM64, Windows x64, and
macOS x64/ARM64; macOS outputs SampSharp.dylib.
Pull requests build and test without publishing; pushes and merges do not run release jobs. Run
Build and publish SampSharp releases manually. Its default refreshes the mutable dev release
with five native components and uniquely versioned 1.0.0-dev.<run>.<commit> NuGet packages. Select
build_only to retain artifacts without publishing. A later run can set artifact_run_id to that
successful run and publish the exact artifacts from the same commit without rebuilding. For managed
versioned artifacts, set the same explicit three-part release_version in both runs. NuGet.org
publication remains optional; every package is attached to its GitHub release.