Downloads
Download ReSharp3DS.3dsx Download ReSharp3DS.cia Download sample-app.zipVersion: v1.7.3
Last updated:
Remember to create a folder named “ReSharp3DS” at the root of your SD card
Description
ReSharp3DS is an experimental project that runs C# code on the Nintendo 3DS using nanoCLR / nanoFramework.
The project uses a C++ 3DS homebrew application to load C# assemblies compiled as .pe files, then executes them through nanoCLR.
Screenshots
Progress & Roadmap
Done (Click to expand)
* [x] Initialize nanoCLR on Nintendo 3DS * [x] Load `mscorlib.pe` and `app.pe` from SD card * [x] Execute C# `Program.Main()` * [x] Call native C++ functions from C# using `InternalCall` * [x] Basic Console API (`Clear`, `Write`, `WriteLine`) * [x] Input support (`Start`, `Select`) * [x] Full Button Mapping (A, B, X, Y, D-Pad, L, R) * [x] Runtime management (`Runtime.Yield()`, static state preservation) * [x] Validate on Citra & Real Hardware * [x] Fix screen flickering by avoiding full redraw every tickTo be implemented (Click to expand)
* [ ] Expanded Console API (bool, float, better formatting) * [ ] Automatic native method binding instead of index-based mapping * [ ] Graphics & Audio APIs * [ ] Filesystem support * [ ] Better error reporting for C# exceptions * [ ] Proper SDK structure & templates * [ ] Stabilize HOME Menu suspend/resume behaviorFile Structure
For the runtime to function correctly, your SD card must be organized as follows:
SD:/
├── 3ds/
│ └── ReSharp3DS.3dsx # Runtime Homebrew
└── ReSharp3DS/ # Data folder
├── mscorlib.pe # nanoFramework base library
└── app.pe # C# program (user app)
Note: The runtime specifically looks for the assemblies in
sdmc:/ReSharp3DS/.
What is it for?
ReSharp3DS is meant for experimenting with managed C# code execution on the Nintendo 3DS. It can be used as a base to build 3DS homebrew logic in C#, test nanoCLR on non-standard platforms, and call native C++ code from C#.
Example:
namespace ReSharp3DS
{
public class Program
{
public static void Main()
{
Console.Clear();
Console.WriteLine("Hello from C# on 3DS!");
Console.WriteLine("Press START to quit.");
while (!Input.IsStartPressed())
{
Runtime.Yield();
}
Console.WriteLine("Bye.");
}
}
}
Requirements
- C++ Side: devkitPro (devkitARM, libctru, make).
- C# Side: nanoFramework-compatible compiler (e.g., nanoFramework.CoreLibrary).
- Hardware: A Nintendo 3DS with Luma3DS and Homebrew Launcher.
Installation & Build
1. Building the Homebrew (C++)
From the project folder, run:
make clean
make
This generates ReSharp3DS.3dsx.
2. Building the C# application
Compile your C# code into a .pe assembly using the nanoFramework toolchain. Rename the output file to app.pe.
3. Deployment
- Copy
ReSharp3DS.3dsxtoSD:/3ds/. - Copy
mscorlib.peand yourapp.petoSD:/ReSharp3DS/(create the folder at the root of the SD if it doesn’t exist). - Launch the app from the Homebrew Launcher.
Troubleshooting
If a file is missing or incorrectly placed, the program will display an error: [FATAL] app load failed
Make sure the ReSharp3DS folder is at the root of the SD card, not inside the /3ds/ folder.