DashTheDev.7D2D.ModCore 1.0.5

dotnet add package DashTheDev.7D2D.ModCore --version 1.0.5
                    
NuGet\Install-Package DashTheDev.7D2D.ModCore -Version 1.0.5
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="DashTheDev.7D2D.ModCore" Version="1.0.5" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="DashTheDev.7D2D.ModCore" Version="1.0.5" />
                    
Directory.Packages.props
<PackageReference Include="DashTheDev.7D2D.ModCore" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add DashTheDev.7D2D.ModCore --version 1.0.5
                    
#r "nuget: DashTheDev.7D2D.ModCore, 1.0.5"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package DashTheDev.7D2D.ModCore@1.0.5
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=DashTheDev.7D2D.ModCore&version=1.0.5
                    
Install as a Cake Addin
#tool nuget:?package=DashTheDev.7D2D.ModCore&version=1.0.5
                    
Install as a Cake Tool

7D2D Mod Core

A foundational library for 7 Days to Die mod development.

ModCore provides a standardized base structure and common utilities for building 7D2D mods, eliminating boilerplate and preventing mod conflicts through automatic assembly merging.

Quick Start

  1. Install the NuGet package:
dotnet add package DashTheDev.7D2D.ModCore
  1. Create your config class:
public class MyConfig : XmlModConfig
{
    public string MyProperty { get; set; } = "default";
}
  1. Create your mod class:
public class MyMod : BaseMod<MyMod, MyConfig>, IModApi
{
    // Your mod implementation
}
  1. Build and be done. Your mod is ready to deploy.

What's Included

BaseMod<T, TConfig>: Base class with overrides handling mod lifecycle, config management, and Harmony patching setup.

IModConfig/BaseModConfig: Mod config interface or base class so that you can easily extend and create your own class that handles config (i.e JSON, etc).

XmlModConfig: Automatic XML serialization/deserialization for mod configuration with support for per-property comments.

Dependency Injection Container: Singleton and transient service registration accessible via YourMod.Instance.Container.

ModLogger: Structured logging with mod-prefixed output for debugging.

GeneralUtility: Common helper methods for logging, reflection, and mod utilities.

Build Process

ModCore automatically merges into your mod DLL using ILRepack, eliminating versioning conflicts between mods. Each mod gets its own isolated copy of ModCore, so multiple mods can use different versions without clash.

Development Setup

  1. Ensure you have Visual Studio and 7D2D installed
  2. Clone the repository
  3. Create a Local.props file in the root:
<?xml version="1.0" encoding="utf-8"?>
<Project xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
    <PropertyGroup>
        <GamePath>YOUR_GAME_PATH_HERE</GamePath>
    </PropertyGroup>
</Project>
  1. Build the solution
Product Compatible and additional computed target framework versions.
.NET Framework net48 is compatible.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • .NETFramework 4.8

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.5 82 7/21/2026
1.0.4 93 7/18/2026
1.0.3 96 7/6/2026

XmlModConfig now preserves whitespace and comments when saving to file