I recently wrote and published a random string generator named Codez on NuGet (How was the name Codez not already taken?). The package can help developers generate random codes. If you need to create confirmation codes, help desk numbers, or container names then Codez is the package for you. The project itself is pretty unremarkable but there was a reason I wrote it.
It's been almost four years since I started considering using .NET Core to build projects. Bill Boga and I wrote a now archived project called Selfie Quote in ASP.NET 5. ASP.NET 5 was a diamond in the rough, and I do mean rough.
I started writing Codez in December of 2018 with one goal in mind: write, compile, and publish a working .NET Core NuGet package on macOS. I've been a long time user of Apple's ecosystem and work primarily in Parallels, which "works" but means I'm working with less than all my machine's resources. I enjoy the app ecosystem on macOS and love productivity enhancements like Homebrew. I also love .NET and C#, which has always been a Windows endeavor. So, was I able to do it?
It's probably not hard to guess that I was able to accomplish my goal. I did most of my development using JetBrains Rider and the latest .NET Core SDK. The build script for the project uses the .NET CLI with basic
dotnet commands. Versioning the project is handled by Adam Ralph's MinVer and Git tags. AppVeyor builds, tests, and publishes the package to NuGet. So how was my overall experience?
I find developing on macOS intuitive and enjoyable. For the most part, things behave as you would expect. All the features associated with .NET development are available: debugging, unit testing, and web app hosting (kestrel) work great. Running
dotnet run from a terminal still has issues. There are instances where the
dotnet process will not terminate. My battery has been drained on several occasions by the dotnet process running for over 10 hours. If you do run into rogue processes on macOS remember the following command:
pskill -a dotnet
The command will kill all processes with the name
dotnet processes will correctly terminate when running .NET Core through an IDE like Rider or Visual Studio for Mac.
I hope to do most of my .NET Core development in the future purely in a macOS environment with a few development dependencies:
- Docker for Mac
- SQL Server for Linux (running in Docker)
- Azurite (cross-platform Azure Emulator)
I'm happy with the state of .NET Core and with the fact that I will soon be able to retire my Windows virtual machines once and for all.