Hi, I am Lukas and I will be your tutor this semester.
I am a software architect, long time .NET developer, front end developer and also data scientiest.
I am here to help you learn C# and start developing under the .NET platform.
slide was left intentionally blank
slide was left intentionally blank
Use .NET Core for your server application when:
Use .NET Framework for your server application when:
Most of .NET Core is using JIT compilation.
JITs are well suited for long-running scenarios. They generate code that targets a specific machine configuration, including specific CPU instructions.
A JIT can also re-generate methods at runtime to achieve a highly-tuned version of the frequently used method.
MONO is using LLVM to do AOT compilation. The same is for Blazor Framework.
The goal of .NET 5 is to use AOT compilation in most cases but use JIT in cases where AOT performance is not great (= generics).
AOT provides fast startup, low footprint, and lower memory usage
This is the base library for .NET Core. It includes the garbage collector, JIT compiler, base .NET types, and many of the low-level classes. The runtime provides the bridge between the .NET Core framework libraries (CoreFX) and the underlying operating systems.
This is the set of .NET Core foundational libraries and includes classes for collections, file systems, the console, XML, async, and many other base items. These libraries build on CoreCLR and provide the interface points for other frameworks into the runtime.
dotnet new -l
dotnet new console
dotnet build
dotnet run
dotnet watch
dotnet add package <package name>
project file should now contain
<PackageReference Include="<package name>" Version="<package version>" />
dotnet add app/app.csproj reference lib1/lib1.csproj lib2/lib2.csproj
project file should now contain
<ItemGroup>
<ProjectReference Include="app.csproj" />
<ProjectReference Include="..\lib2\lib2.csproj" />
<ProjectReference Include="..\lib1\lib1.csproj" />
</ItemGroup>
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>netcoreapp2.1</TargetFramework>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Newtonsoft.Json" Version="9.0.1" />
</ItemGroup>
</Project>
public static void Main() {}
public static int Main() {}
public static void Main(string[] args) {}
public static int Main(string[] args) {}
public static async Task Main() {}
public static async Task<int> Main() {}
public static async Task Main(string[] args) {}
public static async Task<int> Main(string[] args) {}