Skip to content

Creating Your Project

This section will guide you through creating your project and linking it to a local development server.

A local server ensures you have the latest DLLs for both Rust and Carbon.

You can download the Visual Studio 2022 project template for Carbon below. This acts as a self-contained server and development environment for Carbon plugins.

Features:

  • Batch file to download the Carbon QuickStart Repository
  • Preconfigured .csproj file pointing to Carbon.targets
  • Self-contained local server within the project folder
TemplateProject.zip

Choosing an IDE

For optimal development, install either:

Visual Studio 2022

This tutorial assumes you're using VS2022

Step 1: Create Your Directory Structure

Create a base directory (e.g., F:\RustModding) with two subfolders:

  1. Carbon Server – Contains server files
  2. Plugin Dev – For plugin development

Important

Windows has a 256-character path limit.
Keep folders close to your root directory to avoid issues.

Step 2: Download the Carbon QuickStart Files

Download from the Carbon QuickStart Repository and place contents in Carbon Server.

Installation Guide

See Installation Instructions for server setup details.

Step 3: Update Carbon

Run the update_edge.bat file inside the Carbon Server folder. This will download the latest files required for Carbon to function.

Branch Selection

For specific branches, run corresponding update files:

  • update_production.bat
  • update_preview.bat
  • update_edge.bat
  • update_rustbeta_staging.bat

Step 4: Configure the Server

Edit run.bat to modify server settings like name and ports.

Default Password

Make sure you change your password to something unique.

If your password is the default password, your RCon will not work.

Step 5: Start the Server

Run run.bat and wait for the server to fully boot.

Step 6: Enable Developer Mode

  1. Navigate to <root>/carbon/config.json
  2. Set DeveloperMode to true

DLL Management

Developer Mode saves patched DLLs to carbon/developer/patched_assemblies/ for plugin development. These are referenced by Carbon.targets.

Step 7: Create Plugin Project

When prompted to choose a framework, select .NET Framework 4.8 and proceed with the project creation.

Step 8: Modify the Project File

Inside your newly created project, locate the .csproj file. Open it in a text editor and add the following line on the second line of the file:

xml
<Import Project="<root>/Carbon.targets"/>

This ensures that your project has access to the necessary Carbon assemblies. Save the file once done.

Step 9: Restart Your IDE

To apply the changes, close and reopen your IDE.


Once you've completed these steps, your development environment will be fully set up, and you’ll have everything needed to start creating plugins for Carbon.

🎉 Happy Coding! 🚀

Snail for good luck!

Released under the MIT License. Feel free to help us improve!