Overview
You build the .NET MAUI version of GnollHack with a two-step process. This is because we are keeping the Xamarin.Forms version of GnollHack for compatibility reasons and we are sharing code between both architectures. This allows us to maintain both Xamarin.Forms and .NET MAUI versions of GnollHack at the same time.
📋 Prerequisites
Before building, complete the following setup steps:
- Install Visual Studio 2026 for .NET MAUI Development
- Install Windows Subsystem for Linux (required for Android and iOS builds to generate game data)
- Install vcremote for Static iOS Library Project (required for iOS builds)
- Install PuTTY and PSCP and Create Download Scripts for Static iOS Library Project (required for iOS builds)
- Install Tile Sets and FMOD Sound Banks
- Install Secrets File
1. Build Native Libraries and Core Assets (GnollHack.sln)
Building the native solution compiles the C core game engine and prepares the translated UI files.
Prerequisites
Check appropriate build instructions for prerequisites.
Building
- Start Visual Studio Community 2026.
- Open
GnollHack.slnlocated in thewin\win32\vsdirectory. - Select the Android+Windows configuration (or another configuration that matches your target platform).
- Rebuild the solution.
This builds the necessary native libraries (e.g., gnollhackwin.dll for Windows, libgnollhackdroid.so for Android, etc.) and copies them along with the core assets to the respective platform folders of the GnollHackM project. This also runs makedefsdroid, which converts the shared XAML files from GnollHackX to GnollHackM format. You must repeat this step whenever you change code in the native C core or modify XAML files in the GnollHackX folder.
CLI Alternative
You can also build the native solution from the command line:
$msbuild = & "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe
& $msbuild win/win32/vs/GnollHack.sln /t:Rebuild /p:Configuration=Debug /p:Platform="Android+Windows"
The Android+Windows platform configuration builds both Android and Windows native libraries simultaneously. You can also use x64 for Windows only, ARM64 for Android only, or iPhone for iOS only.
⚠️ Warning: For Android and iOS builds, start the SSH service in WSL first (
sudo service ssh start), asdlbdroidgenerates the NetHacknhdatgame data archive inside WSL. For iOS builds, also ensurevcremoteis running on the Mac and use theiPhoneplatform configuration.
2. Build GnollHackM
GnollHackM is the .NET MAUI version of GnollHack.
Prerequisites
- Install .NET SDK 10.0 from https://dotnet.microsoft.com/en-us/download/dotnet/10.0
- Install .NET MAUI 10.0 workload using
dotnet workload install mauiin PowerShell - Install Visual Studio 2026 for .NET MAUI Development
Building
- Start Visual Studio Community 2026.
- Open
GnollHackM.slnthat is located in thewin\win32\xpl\GnollHackMdirectory. - Build
GnollHackM, which is the .NET MAUI version of GnollHack, using appropriate build instructions.
This builds the .NET MAUI version of the game. You need to repeat this step whenever you change things in XAML or the managed C# code.
CLI Alternative
# Windows
dotnet build win/win32/xpl/GnollHackM/GnollHackM.csproj -c Debug -f net10.0-windows10.0.19041.0
# Android
dotnet build win/win32/xpl/GnollHackM/GnollHackM.csproj -c Debug -f net10.0-android
# iOS
dotnet build win/win32/xpl/GnollHackM/GnollHackM.csproj -c Debug -f net10.0-ios
ℹ️ Note: The exact target framework monikers may change over time. Check
GnollHackM.csprojfor current values.
Remarks
Changing Solution Configuration
If you change the solution configuration between Debug and Release, you need to rebuild both GnollHack solution and GnollHackM solution with the appropriate solution configuration. This is because you need appropriately built libraries for the GnollHackM solution from the GnollHack solution. So, you need to:
- Build the GnollHack solution first.
- Then, build the GnollHackM solution.