3 ms·
How do you write C# for mac?
by jhatemyjob 3y ago
How do you write C# for mac?
- becquerel 3y agoYou can write C# in VS Code. It's not the best-ever experience, but it's workable. If you just mean getting it running, .NET is cross-plat.
- CharlieDigital 3y ago> It's not the best-ever experience, but it's workable It's pretty damn good, IMO. Been using it personally building some rather large projects. The only time I miss Rider is when doing refactoring (Rider still much better for that) and code suggestions. Otherwise, VS Code is a great editor for C# IME.
- TobbenTM 3y agoRider is pretty good as an IDE, and .Net works on both M1/2 ARM as well as X64 macOS.
- TheBinaryGuy 3y agoVia .NET, which has been cross platform since 2016 or so (before that Mono was the preferred framework). For the UI bit, I'd recommend Avalonia UI (which is what Ryujinx uses as well). It's cross platform, has been out forever (2013 - from their FAQ page) and even runs on embedded devices. Rider (by JetBrains) has excellent Avalonia support via a plugin and is much better for other .NET stuff over Visual Studio for Mac.
- jasomill 3y agoRelevant aside: while the Ryujinx Avalonia UI has more features and is generally nicer, due to a small number of outstanding issues, Ryujinx uses an older GTK+ UI in its default builds. Avalonia builds are, however, readily available with each release, and auto-update just like standard GTK+ builds. See the project FAQ[1] for full details. [1] https://github.com/Ryujinx/Ryujinx/wiki/FAQ-and-Troubleshooting#-what-is-avalonia https://github.com/Ryujinx/Ryujinx/wiki/FAQ-and-Troubleshoot...
- Goz3rr 3y agoThe same way you write it for Windows and Linux, .NET has been cross platform for almost a decade
- neonsunset 3y agoOfficial SDK for macOS (make sure to pick the right one, arm64 or x64): https://dotnet.microsoft.com/en-us/download/dotnet/7.0 https://dotnet.microsoft.com/en-us/download/dotnet/7.0 Then, an IDE of your preference: - VS Code: install C# extension and Roslynator (it adds useful analyzers) - Rider: provides everything out of box, is more user-friendly (especially for people who used to big and fully-fledged solution) and has much superior debugging capabilities but is paid and has higher memory and battery consumption
- jhatemyjob 3y agoThanks, is there any way to do this without an IDE? I use vim And before someone says "that's impossible, even vanilla macOS development forces you to use Xcode", nope that's not true. You can compile macOS apps with clang just fine.
- TheBinaryGuy 3y agoYou can probably use omnisharp-vim (OmniSharp is the same tech that powers VS Code's C# experience). https://github.com/OmniSharp/omnisharp-vim https://github.com/OmniSharp/omnisharp-vim
- lloydatkinson 3y agoThe same way you write it for anything else. Why would it be different?