RaptorRush135.PvZR.Sdk 1.2.1

<Sdk Name="RaptorRush135.PvZR.Sdk" Version="1.2.1" />
                    
For projects that support Sdk, copy this XML node into the project file to reference the package.
#:sdk RaptorRush135.PvZR.Sdk@1.2.1
                    
#:sdk 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.

🌱 PvZRSdk

NuGet .NET License

A MSBuild Sdk for creating MelonLoader mods for Plants vs. Zombies™: Replanted.

Overview

PvZRSdk simplifies the development of MelonLoader mods for PvZ: Replanted by providing automated project setup, version control, deployment, and packaging through an MSBuild SDK.

To get started, see PvZRModTemplate.


✨ Features

🎯 Project Defaults

  • .NET 6.0 target framework
  • Nullable reference types
  • Implicit usings
  • Latest C# language version
  • x64 platform targeting
  • Invariant globalization
  • Base EditorConfig

🔄 Automatic Versioning

  • MinVer Integration: Automatically determines mod version from git tags
  • Manual Override: Set ModVersion property to override auto-detection

📝 Auto-Generated ModInfo.cs

  • Automatically generates metadata file during compilation
  • Contains mod information:
    • Name: Derived from RootNamespace
    • Version: From ModVersion property
    • Author: From ModAuthor property
    • DownloadLink: From ModDownloadLink property
  • Compiled directly into your DLL for easy access at runtime

✅ Build Validation

  • Validates PvzReDir path exists before compilation
  • Ensures MelonLoader is installed in the specified directory

🚀 Automatic Deployment

  • Copies compiled DLL to {PvzReDir}\Mods folder post-build

📦 Release Packaging

  • Debug info: Emits debugging information into the .dll.
  • Release zip: Creates .zip packages automatically
    • Folder Structure: Maintains proper Mods\ hierarchy in zip

🩹 Polyfills

🔍 Code Quality Analysis

Integrated code analyzers:


⚙️ Configuration

Configurable Properties

Property Type Default Value Description
IsModBuild bool true Whether to apply mod-specific build targets (deployment, packaging, Melon References & Metadata). Set false for library projects.
PvzReDir string C:\Program Files (x86)\Steam\steamapps\common\PVZ Replanted Path to PvZ: Replanted installation directory.
ModVersion string (Auto-detected by MinVer) Explicit mod version override. If empty, MinVer automatically determines version from git tags.
ModAuthor string ??? Mod creator/author name.
ModDownloadLink string TODO Download or repo URL of the mod.
ModMelonType string (Required) Fully qualified type name of the mod class that inherits from MelonMod.
ModColor string (Optional) Color for the mod in the MelonLoader console. Format: ARGB (e.g., 255, 0, 200, 0).
ModZipReplaceVersionDots bool (None) (false) Replace dots in version number with dashes in zip filename (e.g., MyMod_1.0.0.zipMyMod_1-0-0.zip).
ModEnvironmentReference Item (None) Adds an assembly reference from $(PvzReDir)\MelonLoader\net6 (e.g., <ModEnvironmentReference Include="Microsoft.Extensions.Logging.dll" />).

📚 Version Management

Using Git Tags with MinVer

Versions are automatically determined from git tags:

# Create a version tag
git tag v1.0.0
git push origin v1.0.0

# Build will automatically use version 1.0.0
dotnet build

See MinVer for additional configuration options.

Manual Version Override

If you need to bypass MinVer:

<PropertyGroup>
  <ModVersion>1.0.0</ModVersion>
</PropertyGroup>
There are no supported framework assets in this package.

Learn more about Target Frameworks and .NET Standard.

This package has no dependencies.

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.2.1 87 7/29/2026
1.2.0 97 7/28/2026
1.1.2 105 7/21/2026
1.1.1 110 7/18/2026
1.1.0 124 7/12/2026
1.0.0 135 7/6/2026