Complete Guide: Setting Up ASP.NET MVC on MacBook Air M3

Step 1: Install .NET SDK using Homebrew

Run the following command in your terminal:

brew install --cask dotnet-sdk

Verify the installation:

dotnet --version

Step 2: Install Visual Studio for Mac (Optional)

If you want to use Visual Studio, install it using Homebrew:

brew install --cask visual-studio

Open Visual Studio:

open -a "Visual Studio"

Step 3: Create an ASP.NET Core MVC Project

dotnet new mvc -o MyMvcApp cd MyMvcApp

Step 4: Restore Dependencies

dotnet restore

Step 5: Run the Project

dotnet run

Open your browser and go to:

Step 6: Open Project in Visual Studio (Optional)

open MyMvcApp.sln

Step 7: Setup Database with Entity Framework Core (Optional)

dotnet tool install --global dotnet-ef dotnet ef migrations add InitialCreate dotnet ef database update

Step 8: Publish the Project

dotnet publish -c Release -o out

Step 9: Update .NET SDK (When Needed)

brew upgrade dotnet-sdk

That's it! Your ASP.NET Core MVC project is set up and running on your MacBook Air M3.