ChroMapperDir environment variable
Every <HintPath> in the generated .csproj resolves through the ChroMapperDir environment variable. You must set this variable to the root directory of your ChroMapper installation before opening the project in your IDE or running a build.
Path pattern
How to set it on Windows
System Environment Variables (persistent, all sessions):- Open Start, search for “Edit the system environment variables”, and open it.
- Click Environment Variables….
- Under User variables, click New.
- Set Variable name to
ChroMapperDirand Variable value to the full path of your ChroMapper folder (e.g.,C:\Program Files (x86)\Steam\steamapps\common\ChroMapper). - Click OK on all dialogs.
- Restart your IDE so it picks up the new variable.
Build configurations
The project ships with two standard MSBuild configurations.Debug
- Emits a full
.pdbfile alongside the.dll. - Disables optimizations so stack traces and debugger stepping reflect your source.
- Defines both
DEBUGandTRACEconstants so#if DEBUGblocks are included. - The post-build step copies the
.pdbto$(ChroMapperDir)\Plugins\in addition to the.dll.
Release
- Enables optimizations.
- Produces a minimal
pdbonlysymbols file (not copied to ChroMapper). - Only the
TRACEconstant is defined.
| Setting | Debug | Release |
|---|---|---|
DebugSymbols | true | — |
DebugType | full | pdbonly |
Optimize | false | true |
OutputPath | bin\Debug\ | bin\Release\ |
.pdb copied to plugins | Yes | No |
DefineConstants | DEBUG;TRACE | TRACE |
Post-build step
After every successful build the project runs anxcopy command that copies your compiled .dll directly into ChroMapper’s Plugins directory so you can launch ChroMapper immediately without a manual copy step.
/Y— suppresses the overwrite confirmation prompt./F— prints the full source and destination file names during the copy.- The
.pdbcopy only runs in theDebugconfiguration.
The
Plugins directory ($(ChroMapperDir)\Plugins\) must already exist. ChroMapper creates it on first launch, so run ChroMapper at least once before building your plugin.AssemblyInfo.cs version attributes
UpdateAssemblyVersion and AssemblyFileVersion in Properties/AssemblyInfo.cs when you release a new version of your plugin:
AssemblyVersion— used by the .NET runtime for binding. Increment the major or minor component for breaking changes.AssemblyFileVersion— displayed in Windows file properties. Increment this with every release.
Major.Minor.Build.Revision format. A typical release workflow increments Minor for new features and Build for patches:
packages.config and Krafs.Publicizer
packages.config
public before the C# compiler sees them. ChroMapper’s assemblies contain many internal types and members that plugins need to call; Publicizer removes that restriction without modifying the actual ChroMapper DLLs on disk.
It is declared as developmentDependency="true", which means it is a build tool only and is not copied into your output or distributed with your plugin.
The .csproj imports Publicizer’s MSBuild props and targets, and verifies they exist before the build starts: