Skip to content

Creating a Project

Creating a mod for Resonite is simple using the official BepInEx template. This guide covers installing the template, generating a project, and configuring it for development.

.NET templates must be installed before they can be used. This means that when you install the template, it doesn’t create a new project for you, but you will get the ability to do that.

Once you have the template installed, you don’t need to install it again, through it’s a good idea to update it if there are updates.

See the BepInEx Template repository

Install the template from the Resonite modding NuGet feed:

Terminal window
dotnet new install BepInEx.Templates::2.0.0-be.* --nuget-source https://nuget-modding.resonite.net/v3/index.json

If you’re contributing to the template or prefer manual installation:

  1. Clone or download this repository
  2. Navigate to the BepInEx.Templates folder
  3. Run:
Terminal window
cd BepInEx.Templates
dotnet new install .

To update:

Terminal window
git pull
dotnet new install . --force

To uninstall:

Terminal window
dotnet new uninstall .

Once installed, the template will be available as BepInEx 6 Resonite Plugin with the short name bep6resonite.

Run the following command in your Resonite modding directory:

Terminal window
dotnet new bep6resonite --name MyPluginName --authors "MyName" --packageId net.myname.mypluginmame --repositoryUrl "https://github.com/myuser/mymod"

This will create a new folder called MyPluginName with your mod’s project.

You can customize your project with these options:

  • -ve|--version - Plugin version (default: 1.0.0)
  • -au|--authors - Comma-separated list of plugin authors (default: YourName)
  • -r|--repositoryUrl - Repository URL (auto-generated as https://github.com/[FirstAuthor]/[ProjectName] if empty)
  • -p|--packageId - Package ID (auto-generated as [FirstAuthor].[ProjectName] if empty)
  • -g|--gitInit - Initialize a git repository (default: true)

This example demonstrates creating a project with the template:

Terminal window
~/Workspace/Resonite$ dotnet new bep6resonite -n ResoniteMod
The template "BepInEx 6 Resonite Plugin (.NET 9, Thunderstore Ready)" was created successfully.

After creation, you’ll see helpful next steps instructions. Now let’s look at the project structure:

Terminal window
~/Workspace/Resonite$ cd ResoniteMod/

The file structure in ResoniteMod/ should look like this:

  • .gitignore
  • CHANGELOG.md
  • Directory.Build.targets
  • icon.png
  • LICENSE
  • README.md
  • ResoniteMod.sln
  • thunderstore.toml
  • Directory.config/
    • dotnet-tools.json
  • Directorysrc/
    • DirectoryResoniteMod/
      • Plugin.cs
      • ResoniteMod.csproj

Key points:

  • Your mod code is in ./src/<project-name>/
  • Directory.Build.targets file defines PackTS target, see the Packaging and Publishing guide
  • <project-name>.sln is your project solution

The project is configured so that it’s easy to add new projects into your project solution. Even if you don’t need that, it’s good to follow this standard project structure.

After creating your project, the template provides helpful instructions:

  1. Set up game path: Either set ResonitePath environment variable or update GamePath in the .csproj
  2. Review metadata: Update project metadata in the .csproj file (Version, Authors, etc.)
  3. Replace TODOs: Search for TODO comments in the generated template and replace them with your actual values
  4. Build: Run dotnet build - this automatically copies the plugin to BepInEx/plugins folder

The template automatically finds your Resonite installation:

  1. First checks the ResonitePath environment variable
  2. Falls back to Steam installation paths
  3. Uses NuGet package for game references if local install not found

Your plugin metadata is automatically generated from .csproj properties:

  • PackageID → Plugin GUID
  • Product → Plugin Name
  • Version → Plugin Version
  • Authors → Plugin Authors
  • RepositoryUrl → Repository URL

The template includes built-in Thunderstore packaging support. Your project comes with:

  • thunderstore.toml - Package configuration
  • icon.png - Your mod’s icon (replace with your own 256x256 image)
  • Build targets for creating and publishing packages

For detailed packaging and publishing instructions, see the Packaging and Publishing guide.