Apr 3, 2023

.NET on Linux: Simpler Than It Seems

Developing .NET solutions on Linux has always been challenging because Microsoft’s Visual Studio requires Windows in order to work. After working on several .NET projects, I decided to test the limits of development of .NET on Linux. This simple tutorial focuses on an ASP.NET MVC application with SQL Server to show how elegant and effective .NET development can be on my preferred OS.

Development Environment

First, we must ensure the .NET tools and SDK associated with our particular flavor of Linux are installed using Microsoft’s standard guide.

My preferred development environment consists of a windowed integrated development environment (IDE), a powerful database management and query tool, the database itself, and tools for building and deployment. I use the following tools to achieve solid functionality and enable a beautiful coding experience:

  • IDE: Visual Studio Code
  • Database management and query tool: DBeaver
  • Database: Microsoft SQL Server (Linux Installation)
  • Build tools: .NET SDK Command Line Interface (CLI)
  • Virtual machine and containers: Docker

Make sure these tools are properly installed before you proceed with our sample application.

Project Scaffolding

In this sample application, we’ll highlight ASP.NET development and functionality through a series of use cases for a hypothetical shoe store inventory management system. As with any new .NET application, we’ll need to create a solution and then add a project to it.

Cretech