# Dotnet (.NET) | ![img \|150](https://upload.wikimedia.org/wikipedia/commons/thumb/7/7d/Microsoft_.NET_logo.svg/320px-Microsoft_.NET_logo.svg.png) | The .NET platform is a free and open-source, managed computer software framework for Windows, Linux, and macOS operating systems. The project is mainly developed by Microsoft employees by way of the .NET Foundation and is released under an MIT License. | | ---- | ---- | | | wikipedia:: [.NET](https://en.wikipedia.org/wiki/.NET) | aka:: .NET "Core" cross platform part is implicit now Cross-platform - Windows, Mac, Linux ## Meta - [[VS Code]] - [[Rider]] ### Install `brew install dotnet-sdk` dotnet is only the runtime so you want `dotnet-sdk` ### Versions #### Multiple Versions Install official sdk with brew. Then use [isen-ng/homebrew-dotnet-sdk-versions: dotnet-sdk versions HomeBrew Tap](https://github.com/isen-ng/homebrew-dotnet-sdk-versions?cmdf=install+older+version+of+dotnet+with+homebrew) to install specific versions which depends on the official sdk. Manage use of different versions with a global.json file in your project root: ##### global.json File [Select which .NET version to use - .NET | Microsoft Learn](https://learn.microsoft.com/en-us/dotnet/core/versions/selection?cmdf=dotnet%20version%20manager) ``` { "sdk": { "version": "5.0.0" } } ``` ### Frameworks, etc. - SignalR - .NET Framework (old) - The older version #### Frontend/Web/Pages - [Choose an ASP.NET Core UI | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/tutorials/choose-web-ui?view=aspnetcore-8.0) - [ASP.NET MVC Pattern | .NET](https://dotnet.microsoft.com/en-us/apps/aspnet/mvc) - [[ASP.NET Core]] - [[ASP.NET Core Blazor]] - [[ASP.NET Core Razor Pages]] - [[ASP.NET MAUI]] - [[Model-view-controller (MVC)]] - [Get started with ASP.NET Core MVC | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/tutorials/first-mvc-app/start-mvc?view=aspnetcore-8.0&tabs=visual-studio) - ASP.NET Core MVC renders UI on the server and uses a Model-View-Controller (MVC) architectural pattern. #### Backend/Data - Aspire - [Introducing .NET Aspire: Simplifying Cloud-Native Development with .NET 8 - .NET Blog](https://devblogs.microsoft.com/dotnet/introducing-dotnet-aspire-simplifying-cloud-native-development-with-dotnet-8/?cmdf=.net+aspire) - Entity Framework - [[Object Relational mapping|ORM]] - [Entity Framework | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/entity-framework?cmdf=microsoft%20entity) - Web API - [[gRPC]] - [Overview for gRPC on .NET | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/grpc/?view=aspnetcore-8.0) - [Create a .NET Core gRPC client and server in ASP.NET Core | Microsoft Learn](https://learn.microsoft.com/en-us/aspnet/core/tutorials/grpc/grpc-start?view=aspnetcore-8.0&tabs=visual-studio) - [grpc/grpc-dotnet: gRPC for .NET](https://github.com/grpc/grpc-dotnet) #### Mobile - [[Xamarin]] ## Environment ### Servers - Kestrel - IIS - IIS Express - Just for development ### Program.cs - [[Middleware]] - e.g. app.UseRouting(), app.UseAuthorization(), etc. - OrderMatters ## [[C Sharp]] ## [[NuGet]] ## `dotnet` Command `dotnet` - `--list-sdks` - `tool` - restore - `nuget` - list ## Sources - [Learn .NET | Free tutorials, videos, courses, and more](https://dotnet.microsoft.com/en-us/learn) - [.NET on Microsoft Learn | Microsoft Learn](https://learn.microsoft.com/en-us/training/dotnet/?WT.mc_id=dotnet-35129-website) ## Inbox - [[Dependency Injection]] - Annotations - Object Lifetimes - Singleton - Transient - Scoped - Concurrency - Data Store - Data Binding