Developing .NET Applications on macOS Without Visual Studio: A Complete Guide

With Visual Studio for Mac officially discontinued and SQL Server Management Studio (SSMS) being Windows-only, many developers on macOS are left wondering how to continue building .NET apps.

The good news? .NET is fully cross-platform. By using modern tools like JetBrains Rider, Docker, and DBeaver, you can develop and manage .NET applications seamlessly on macOS.

This guide will walk you through:

✅ Setting up JetBrains Rider as your IDE
✅ Running SQL Server via Docker
✅ Managing your database using DBeaver
✅ Connecting your .NET project to SQL Server
✅ Running Entity Framework Core migrations from the terminal
✅ Troubleshooting common Docker issues

Use Rider IDE – The Best Visual Studio Alternative on macOS

  JetBrains Rider is a modern and feature-rich IDE that works perfectly for .NET development on macOS. It offers:

  • Full C# and .NET Core support
  • Advanced code inspections and refactoring tools
  • Integrated debugger and terminal
  • Built-in database tools
  • Excellent performance for large solutions

       📥 Download Rider: https://www.jetbrains.com/rider/

 

Run SQL Server on Docker

Since SQL Server isn't natively supported on macOS, we'll use Docker to run a containerised SQL Server instance.

➤ Pull the SQL Server Docker image:

docker pull mcr.microsoft.com/azure-sql-edge

➤ Run the container:

docker run -e "ACCEPT_EULA=1" \
           -e "MSSQL_SA_PASSWORD=MyPass@word" \
           -e "MSSQL_PID=Developer" \
           -p 1433:1433 \
           -d --name=sql \
           mcr.microsoft.com/azure-sql-edge

Connect to SQL Server Using DBeaver

DBeaver is a free and powerful cross-platform SQL client.

➤ Setup Steps:

  • Open DBeaver
  • Create a new SQL Server connection
  • Use the following credentials:

Field

Value

Host

localhost

Port

1433

Username

sa

Password

MyPass@word

  • Test the connection.

Connect .NET Project to SQL Server (Add Connection String)

Update your appsettings.json with the following connection string:

"ConnectionStrings": {
  "NZWalksConnectionString": "Data Source=localhost;Initial Catalog=NZWalksDB;User Id=sa;Password=MyPass@word;
  TrustServerCertificate=True;Integrated Security=False"
}

Run EF Core Migrations from the Terminal in Rider

Since Rider doesn't include the NuGet Package Manager Console, you'll run EF Core commands via the terminal.

➤ Initial migration:

dotnet ef migrations add Initial
dotnet ef database update

➤ Add more migrations:

dotnet ef migrations add "Message"
dotnet ef database update

➤ For multiple DbContext files:

dotnet ef migrations add "Message" –context NZWalksAuthDbContext
dotnet ef database update --context "NZWalksAuthDbContext"

Use C# Interactive (Optional but Handy for Scripts)

To use interactive C# scripting and quickly test snippets or generate GUIDs:

➤ Install the tool:

dotnet tool install -g dotnet-script

➤ Launch C# interactive:

dotnet script

➤ Example snippet:

Console.WriteLine(Guid.NewGuid());

Docker Troubleshooting Tips

If your SQL Server container stops responding or crashes, use these commands:

➤ Restart the container:

docker kill ContainerName/ContainerID
docker restart ContainerName/ContainerID

NOTE: It is better to use the container ID instead of the container name so that it can more effectively point to the container image.

➤ If the container won't stay running:

docker stop sql
docker rm sql
docker volume create sqlvolume

docker run -e 'ACCEPT_EULA=1' \
           -e 'MSSQL_SA_PASSWORD=MyPass@word' \
           -p 1433:1433 \
           --name sql \
           -v sqlvolume:/var/opt/mssql \
           -d mcr.microsoft.com/azure-sql-edge

Why this works: Using a named volume (sqlvolume) ensures your database files persist between container restarts.

 

Technologies