JimmyOneTime
Posts: 2
Joined: Fri Feb 16, 2024 7:28 pm

C# on a raspberry Pi?

Fri Feb 16, 2024 7:32 pm

Hey Forum,

I am about to embark on a cheeky little raspberry pi project. I can code in C#. I have read that it is possible to get a C# application running on raspberry PI5 with C#. Has anyone had any experience with doing this? Will it work? Will it be stable? Is it advisable?

Interested to hear your thoughts....

Thanks

User avatar
Fixizin
Posts: 42
Joined: Sat May 13, 2023 3:48 pm
Location: Miami, Florida, USA

Re: C# on a raspberry Pi?

Sat Feb 17, 2024 12:35 am

Nothing to add, just trying to understand the context and implications.

Do you mean C# within the VS Code IDE running natively ON RPi? Perhaps a slim chance MS has made C# toolchain available to ARM/Linux? Certainly GNU does not support it. But then again there's the Windows 10 IoT version, so...??

Never used a MicroSquish compiler, but do I understand "C-sharp" (C#) is basically C++ with GUI "hooks" and libs to create Windows apps?

Oh wait... these folks say you can cross-compile FOR RPi on your x86 PC with paid/free Visual Studio... hmmm...

https://tutorials-raspberrypi.com/write ... p-dot-net/

... and running a Win emulator(?) called Mono Project...?

https://www.mono-project.com/docs/about-mono/

Seems like a LOT of bloat-ware to avoid X-Windows and be MS-friendly... please run htop if you ever get one of these C# apps running on RPi.

jamesh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 33343
Joined: Sat Jul 30, 2011 7:41 pm

Re: C# on a raspberry Pi?

Sat Feb 17, 2024 6:27 am

Lookup the Mono project, that should give you what you need.
Principal Software Engineer at Raspberry Pi Ltd.
Working in the Applications Team.

User avatar
cct
Posts: 177
Joined: Wed Feb 17, 2021 3:13 am
Location: Cambridge, UK

Re: C# on a raspberry Pi?

Sat Feb 17, 2024 4:43 pm

Fixizin wrote:
Sat Feb 17, 2024 12:35 am
Nothing to add, just trying to understand the context and implications.

Do you mean C# within the VS Code IDE running natively ON RPi? Perhaps a slim chance MS has made C# toolchain available to ARM/Linux? Certainly GNU does not support it. But then again there's the Windows 10 IoT version, so...??

Never used a MicroSquish compiler, but do I understand "C-sharp" (C#) is basically C++ with GUI "hooks" and libs to create Windows apps?

Oh wait... these folks say you can cross-compile FOR RPi on your x86 PC with paid/free Visual Studio... hmmm...

https://tutorials-raspberrypi.com/write ... p-dot-net/

... and running a Win emulator(?) called Mono Project...?

https://www.mono-project.com/docs/about-mono/

Seems like a LOT of bloat-ware to avoid X-Windows and be MS-friendly... please run htop if you ever get one of these C# apps running on RPi.
Microsoft created an ISO standard for c#. It, along with .NET is open source and cross platform
--
Chris

ProjectMayu
Posts: 37
Joined: Sun Jul 01, 2012 8:58 am

Re: C# on a raspberry Pi?

Mon Feb 26, 2024 9:34 pm

Use Dot Net 8, Publish as Self contained Arm32 or Arm64
and for a GUI you can use Avalonia, UNO or ETO.Forms

Return to “Other programming languages”