ReSharp3DS

ReSharp3DS

Saysaa

C# runtime and SDK for Nintendo 3DS

Downloads

Download ReSharp3DS.3dsx Download ReSharp3DS.cia Download sample-app.zip
Version: v1.7.3
Last updated:

Remember to create a folder named “ReSharp3DS” at the root of your SD card

Description

ReSharp3DS Documentation

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

IMG_0694 IMG_0703

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 tick
To 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 behavior

File 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

  1. Copy ReSharp3DS.3dsx to SD:/3ds/.
  2. Copy mscorlib.pe and your app.pe to SD:/ReSharp3DS/ (create the folder at the root of the SD if it doesn’t exist).
  3. 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.