WPR is a Windows Phone 7/8 game runner that re-hosts XNA (and, increasingly,
Silverlight) titles on modern Windows desktop and Android. This is a fork of
the original WPR — heavily modified to
target .NET 8 + Avalonia 11.3.9 with a runtime shim layer that lets
unmodified game .xap packages run against modern .NET.
Status: work-in-progress. The
mainbranch is not guaranteed to build or run cleanly at any given checkpoint. Active development happens on per-feature branches (currentlyfix-zuma-revenge).
Since branching from upstream WPR:
- .NET 8 / Avalonia 11.3.9 port. Replaced the legacy Avalonia 0.9/0.10
UI stack; rebuilt the desktop and Android entry points
(
WPR.UI.Desktop,WPR.UI.Android). - Silverlight runtime (initial). Added
WPR.SilverlightCompability, a from-scratch reimplementation of Silverlight 4 / Windows Phone XAML controls on top of Avalonia. Layout, gestures and the Panorama / Pivot parallax state machine are written in-tree (no Silverlight parser dependency). Currently boots a small set of Silverlight XAPs — see the compatibility table below. Launched viaSilverlightLauncher.LaunchAsync. - Persistent achievements. Per-game achievement progress is now seeded
at install time (
XnaAchievementSeederscrapes TrueAchievements once and populates a SQLite DB) and stored across runs. - Refactored shim layout.
WPR.SilverlightCompability's source tree now mirrors the upstream Silverlight namespace hierarchy (one C# file per type, file path matches the real namespace) — see CLAUDE.md for the convention. - Per-game debug logs.
ApplicationLaunchmirrorsTrace/Debugoutput to%LocalAppData%\WPR\Apps\<ProductId>\wpr_game_debug.logso silent-crash games leave a diagnostic file. - Keyboard accelerometer. Bind keys to simulate phone tilt for games
that use
Microsoft.Devices.Sensors.Accelerometer. The Controls page (sidebar) lets you set the four tilt directions, adjust sensitivity, toggle the in-game tilt overlay, and live-preview the synthesized reading. Orientation-aware: in landscape games the screen-relative intent (W = "tilt up the screen") is rotated into the device-portrait frame the WP7 sensor contract expects. - Startup health-check & explicit Avalonia init logging on both desktop and Android targets.
- FontAwesome icon provider registered in the AppBuilder; main app list now populates on launch (was waiting on search input).
- Android target rebuilt against Avalonia 11; min-SDK raised; SDL2 + FFmpeg bindings included via Java bindings projects.
WPR runs a Windows Phone game's original assemblies, IL-rewritten at install time to redirect WP/Silverlight/XNA API calls to in-tree shims.
.xap / XNA folder
│
▼ LibraryScanner (discovers packages)
▼ ApplicationInstaller (unpacks to %LocalAppData%\WPR\Apps\<ProductId>)
▼ ApplicationPatcher (Cecil-rewrites every .dll; leaves .dll.original)
▼ XnaAchievementSeeder (populates SQLite achievements DB)
│
▼ (user clicks "Run")
▼ XnaLauncher → ApplicationLaunch.Start (XNA games via FNA)
▼ SilverlightLauncher.LaunchAsync (Silverlight XAPs)
Project layout (Src/):
| Project | Role |
|---|---|
Core/WPR |
Install/launch/patch pipeline, models, EF Core DB |
Core/WPR.Common |
Logging, paths, configuration |
Core/WPR.SilverlightCompability |
Silverlight 4 / WP XAML re-impl on Avalonia |
Core/WPR.WindowsCompability |
System.Windows.* shims (Application, BitmapImage, IsolatedStorage, …) |
Core/WPR.StandardCompability |
System.ServiceModel / WCF-lite shims |
Core/WPR.XnaCompabilityPatch |
XNA-side shims layered on top of FNA |
Core/Microsoft.Phone |
Microsoft.Phone.* (Shell, Tasks, Marketplace, Scheduler, …) |
Core/Microsoft.Xna.Framework.GamerServices |
Gamer profile, achievements, leaderboards |
Core/Microsoft.Device.Sensors |
Accelerometer / Compass |
Core/System.Device |
System.Device.Location |
UI/WPR.UI |
Shared Avalonia UI (views, view-models, launchers) |
UI/WPR.UI.Desktop |
Windows entry point (net8.0-windows10.0.17763.0) |
UI/WPR.UI.Android |
Android entry point |
ThirdParty/fna |
FNA (XNA reimplementation) |
ThirdParty/Icons.Avalonia |
Vendored Projektanker icons, patched for Avalonia 11.3.9 |
See CLAUDE.md for the in-depth build/install/patch workflow, including the rule that patcher table changes require reinstalling affected games (the IL rewrite happens once at install time).
Recommended:
- Open
Src/WPR.slnin Rider (or VS 2022 17.8+). - Build → run
WPR.UI.Desktop.
Target frameworks:
- Desktop:
net8.0-windows10.0.17763.0 - Android:
net8.0-android(set up via the system .NET SDK + Android workload — see CLAUDE.md for the SDK version pitfalls on this dev box)
The full-solution dotnet build hits NU1202 on Avalonia.Android if the
workload version doesn't line up. To verify a small edit on a leaf project:
dotnet build <project>.csproj -c Debug `
-f net8.0-windows10.0.17763.0 `
-maxcpucount:1 -nodeReuse:false --nologoThe -maxcpucount:1 flag avoids an MSBuild CS0006 race; the explicit TFM
skips the Android leg.
See the interactive Compatibility List — searchable / sortable / filterable, with box art.
The installer recognises three .xap flavours
(ApplicationType.cs):
| Type | Status | Notes |
|---|---|---|
XNA |
Working | Main path; runs on FNA via the WPR.XnaCompability shim layer. |
Silverlight |
Experimental | Boots a small set of XAPs through the in-tree WPR.SilverlightCompability Avalonia re-impl. |
ModernNative |
Not supported | C++/CX + WinRT apps ship as native PE binaries — out of scope. |
- Desktop game-launch regressions following the .NET 8 / Avalonia 11.3 upgrade.
- Android target sometimes shows a white screen instead of the app UI.
- Several patcher entries from legacy WPR are still missing — game-specific
errors above (
IsolatedStorageSettings2.Contains,GamerProfile.GetGamerPicture, etc.) are usually missing shims, not bugs in the runner itself. - Silverlight runtime: only a handful of controls + the Panorama/Pivot machine
have been implemented;
LongListSelector,WrapPanel,PhoneTextBox,PerformanceProgressBar,GestureService/GestureListenerand several default styles (ButtonStyleLight,DarkThemePanoramaStyle,PhoneApplicationPageStyle) are still TODO. - README + Wiki translation (RU / CN).
- Long-term: explore a port to MAUI for unified multi-platform.
A common gotcha — patcher changes do not affect already-installed games:
- Shim implementation change (any
.csunderWPR.*Compability,Microsoft.*,System.*): rebuild only. Installed games pick up the new behaviour on next launch. - Patcher table change (
ApplicationPatcher.cs— new entries inPatches/MemberPatches): rebuild and reinstall the affected games. The IL was rewritten at install time; new redirects don't apply retroactively.
- Newest Rider / VS 2022 (17.8+) recommended.
- Targets
net8.0-windows10.0.17763.0— Windows 11 recommended; Windows 10 may need the 17763 (1809) baseline or newer. - Desktop runtime pulls in
FAudio.dll/FNA3D.dll/SDL2.dll/FNWP72.dll/ffmpeg.exe(shipped next to the executable). - Per-game install data lives under
%LocalAppData%\WPR\Apps\<ProductId>, with a<game>.dll.originalsibling kept for re-patching.
Moved to the wiki — see Update History.
- mediaexplorer74/WPR — the fork this one is based on; foundational Avalonia port work, Android target groundwork, and the long-running RnD that made everything downstream possible
- Tyler Jaacks — net5/6 → net8 upgrade
- Hector47 — online services groundwork
- TylerJaacks/WPR — branches
net8_upgradeanddotnet_upgradecarry useful work - Hector47/WPR —
masterhas GameServices ideas - yangzhongke/Windows-Phone-Emulator — Silverlight 4 prior art for WP control reimplementations (defers to the Silverlight XAML parser, so not transplantable here, but the C# for Panorama/Pivot/Transitions is a useful reference)
AS IS. No support. Developers / geeks only — DIY mode.

