How to Set Up the Wand Enhancer Development Environment: Complete Windows Guide
Setting up the Wand Enhancer development environment requires Windows with Visual Studio 2022, CMake, .NET Framework 4.8, Node.js 18+, and pnpm, followed by running the orchestrated build script that compiles the TypeScript web-panel, native C++ helper, and C# WPF application in the correct order.
Wand Enhancer is a Windows-only WPF application that patches the Wand client by injecting a thin Electron-based remote panel. The project spans three distinct codebases—a TypeScript web-panel, a native C++ helper, and C# WPF logic—requiring a specific tool chain and build order to compile successfully. This guide walks you through the complete setup process using the official repository at k1tbyte/Wand-Enhancer.
Prerequisites
Before cloning the repository, ensure your Windows workstation meets the following requirements.
System Requirements
- Operating System: Windows 10 or 11 (64-bit)
- Memory: Minimum 4GB RAM recommended for parallel compilation
- Disk Space: Approximately 2GB for Visual Studio, Node modules, and build artifacts
Development Tools
Install these tools in the following order:
- Visual Studio 2022 with the "Desktop development with C++" workload
- CMake (download from https://cmake.org or install via Visual Studio Installer)
- .NET Framework 4.8 SDK (included with Visual Studio 2022)
- Node.js version 18 or higher
- pnpm (preferred over npm):
npm install -g pnpm
Quick Start with Automated Build
The fastest way to configure your Wand Enhancer development environment is using the provided build script.
First, clone the repository:
git clone https://github.com/k1tbyte/Wand-Enhancer.git
cd Wand-Enhancer
Then execute the orchestrated build:
./build.cmd
Or via PowerShell:
powershell -ExecutionPolicy Bypass -File build.ps1
The build.cmd script handles the critical build sequence automatically:
-
Installs Node dependencies for the web-panel
-
Compiles the TypeScript bridge and renderer scripts
-
Builds the native C++ DLL using CMake
-
Restores NuGet packages for the C# solution
-
Compiles the WPF application with MSBuild
After completion, find the executable at WandEnhancer/bin/Debug/net48/WandEnhancer.exe.
Manual Build Process
For granular control over the Wand Enhancer development environment, build each component separately following this strict order: Web-Panel → Native Helper → C# Solution.
Build the Web Panel
The web-panel contains the Electron-based remote UI served at http://127.0.0.1:3223 (configurable in web-panel/bridge/src/constants.ts).
cd web-panel
pnpm install
pnpm run build:bridge
pnpm run build
This produces bridge.cjs, renderer scripts, and bundles everything into web-panel/dist/. Note: This step must complete before compiling the C# solution because these assets are embedded into the final binary.
Build the Native Helper
Compile the native fuse-bypass DLL located in tools/asar-fuses-bypass/:
cd ../tools/asar-fuses-bypass
mkdir build && cd build
cmake .. -G "Visual Studio 17 2022" -A x64
cmake --build . --config Release
This generates the native library used by AsarSharp/AsarExtractor.cs to manipulate Wand's app.asar archives.
Build the C# Solution
Finally, compile the WPF application and patching logic:
cd ../../WandEnhancer
dotnet restore
msbuild Wand-Enhancer.sln /p:Configuration=Debug
The WandEnhancer/Program.cs entry point initializes the core UI, patch orchestration, and loads the Electron web panel from the previously built app.asar modifications.
Project Architecture Overview
Understanding the three-tier architecture helps troubleshoot build issues in your Wand Enhancer development environment.
WandEnhancer (C#)
Located in WandEnhancer/Program.cs, this component provides the core WPF UI, patch orchestration, user settings persistence, and the bridge that loads the Electron web panel into app.asar.
AsarSharp (C#)
The AsarSharp/AsarExtractor.cs library handles extraction, modification, and repacking of WeMod's app.asar archives. This utility is essential for the injection mechanism.
Web-Panel (TypeScript)
Found in web-panel/bridge/src/constants.ts, this small Electron bridge serves the remote UI, synchronizes installed games, tracks trainer status, and accepts remote commands. All runtime assets compile into web-panel/dist/.
Configuration and Verification
Once built, verify your Wand Enhancer development environment by running the executable:
./WandEnhancer/bin/Debug/net48/WandEnhancer.exe
The remote panel should initialize on http://127.0.0.1:3223 (or your configured host/port defined in web-panel/bridge/src/constants.ts). Check that the application can successfully patch the Wand client by monitoring the AsarSharp extraction logs in the debug console.
Summary
Setting up the Wand Enhancer development environment involves coordinating three distinct build systems:
-
Install Visual Studio 2022, CMake, .NET Framework 4.8, Node.js 18+, and pnpm on Windows
-
Clone the
k1tbyte/Wand-Enhancerrepository -
Run
./build.cmdfor automated pipeline execution, or build manually in the order: Web-Panel → Native Helper → C# Solution -
Ensure the web-panel builds before the C# solution because TypeScript assets are bundled into the final executable
-
Locate the output at
WandEnhancer/bin/Debug/net48/WandEnhancer.exe
Frequently Asked Questions
What is the correct build order for Wand Enhancer components?
You must build the web-panel first, then the native helper, and finally the C# solution. The TypeScript bridge (bridge.cjs) and renderer scripts must be compiled into web-panel/dist/ before running MSBuild on the WPF solution, as these assets are embedded into the final binary during the C# compilation phase.
Can I use npm instead of pnpm for the web-panel?
While the documentation specifies pnpm as the preferred package manager, npm will work if you adjust the commands accordingly. However, the build.cmd script expects pnpm, so manual builds are required if you substitute npm. Ensure you use Node.js version 18 or higher regardless of the package manager.
Where is the native helper DLL used in the application?
The native helper, built from tools/asar-fuses-bypass/CMakeLists.txt, produces a DLL consumed by AsarSharp/AsarExtractor.cs. This library handles low-level file system operations required to bypass Electron fuses and modify the Wand client's app.asar archive without corruption.
How do I change the remote panel's host or port?
Modify the configuration in web-panel/bridge/src/constants.ts, which defines IPC channels, WebSocket opcodes, and the default host (127.0.0.1) and port (3223). After editing, rebuild the web-panel and the C# solution to embed the new defaults into the executable.
Have a question about this repo?
These articles cover the highlights, but your codebase questions are specific. Give your agent direct access to the source. Share this with your agent to get started:
curl -s "https://instagit.com/install.md" Maintain an open-source project? Get it listed too →