Microsoft .NET (dotNET)

| Comments

Contents:

.NET Core #

To build self-contained executables, add this in .csproj/.fsproj:

<PropertyGroup>
    <SelfContained>true</SelfContained>
    <PublishTrimmed>true</PublishTrimmed>
    <PublishSingleFile>true</PublishSingleFile>
</PropertyGroup>

For NativeAOT:

  • zerosharp: “demo of the potential of C# for systems programming with the .NET native ahead-of-time compilation technology”;

Libraries (General) #

Database migrations:

C# (CSharp) #

Game Development #

Web Development #

# Starting a new solution
dotnet new sln -o MyBigProject
cd MyBigProject

# Start a new web app
dotnet new webapp -o web-app --no-https -f net7.0
cd web-app

# Start development server
dotnet watch

F# (FSharp) #

Start New Project #

# Starting a new solution
dotnet new sln -o AdventOfCode

# Start a console applicatin
cd AdventOfCode/
dotnet new console -lang "F#" -o App

# Add project to the solution
dotnet sln add App/App.fsproj

# Restore NuGet dependencies
dotnet restore

# Build the project
dotnet build

# Run the project
cd ./App
dotnet run

# Build for release
dotnet publish --configuration Release

Articles #

Native AOT:

Presentations #

Templates #

Tools (F#) #

  • Forge: for creating projects
  • Paket: for Nuget dependencies management
  • FAKE: build management

Libraries (F#) #

Unit testing:

Database access:

  • EFCore Sharp: F# migrations (design-time) support for EF Core.