.NET Core 3.0 –
What's New?
christian@christiannagel.com
@christiannagel
https://csharp.christiannagel.com
Topics
C# 8 & .NET Core 3.0
ASP.NET Core 3.0
WPF & .NET Core
Christian Nagel
• Training
• Coaching
• Consulting
• Development
• Microsoft MVP
• www.cninnovation.com
• csharp.christiannagel.com
C# 8 & .NET Core
.NET
Standard 2.1
• Reflection.Emit
• Brotli
• Span, APIs
• DbProviderFactories
• ITuple
Features
C# 8 Features
Not supported by .NET Framework
Smaller C# 8 Features
using declaration
switch expression
more pattern matching
C# 8 – Async Streams
Before C# 8, await could be used to wait for a single
result
IAsyncDisposable, IAsyncEnumerable,
IAsyncEnumerator
foreach and yield extended with async semantics
C# 8 – Indices
and Ranges
• Span<T> allows reference a memory sequence
• Safe code, fast access, no object copy
• .NET Core 2.2 method overloads with spans
• Use C# 8 Ranges to access arrays, strings…
• .NET Core 3.0 faster, e.g. JSonDocument,
Utf8JsonReader, UTF8JsonWriter
C# 8 –
Nullable
Reference
Types
• Reference Types are not nullable anymore
• Get rid of NullReferenceException
• Breaking change
• Opt-in (project, code regions)
Nullability
Annotation Guidance
• .NET Core annotation in progress
• Do annotate all new APIs
• Consider changing the contracts if there's a
different de facto use
• Do continue to validate arguments
• Do not remove existing argument validation
• Avoid making changes while annotating
unless it's a bug fix
• some?.Method()
• https://github.com/dotnet/corefx/blob/ma
ster/Documentation/api-
guidelines/nullability.md
ASP.NET Core 3
Demos ASP.NET
Core
ASP.NET Core
3
• Generic host in Templates
• Service configuration simplified
• Endpoint Routing
• SignalR Client-to-Server Streaming
• JSON Serialization
• Worker Service Template
• gRPC Template
Blazor
• Components for the Web
• Based on Syntax of Razor Pages
• Client-Side Components make use of
WebAssembly
• Server-Side Components communicate via SignalR
• Server-Side Components released with .NET Core 3
• Client-Side Components released with a later .NET
Core 3 version
WPF and .NET Core Does WPF have a
future?
WPF (.NET
Framework) &
Windows
Runtime
WPF App
• Use Some Windows Runtime APIs
Packaging (Desktop Bridge)
• Use more Windows Runtime APIs
App-Service WPF – UWP
• Desktop Bridge & App Service
• Use all Windows Runtime APIs
XAML Islands
UWP Controls for WPF & Windows Forms
Wrappers for Ink, Map, Media
Create your own!
Windows Community Tookit
WPF & .NET
Core
New Project File
All C# 8 & .NET Core Features
Use the Windows Runtime
Side-by-side Runtime
Self-contained Exes
Interop
Use the Portability
Analyzer
Windows
Compatibility Pack
COM Interop
coming
WPF only runs on
Windows!
Summary
• C# 8 & .NET Core
• ASP.NET Core
• WPF & .NET Core
Questions?
Actions
• Use C# 8
• Annotate your applications & libraries
• Use .NET Core 3
• Prepare for ASP.NET Core 3
• Be open for new application models
• Use the portability analyzer for WPF
• WPF & .NET Core
• https://github.com/christiannagel
• https://csharp.christiannagel.com
• https://docs.microsoft.com
• https://github.com/windows-toolkit/
• https://github.com/dotnet/
A BIG thank you to local sponsors!
Another BIG thank you to the 2019 Global Sponsors!
The European SharePoint, Office 365 & Azure Conference
4 Days 2,500 Delegates 150+ Sessions 120 Speakers
Microsoft Azure Keynote, 40 Azure Sessions, Azure Full Day Tutorials, Expert Global
Azure Speakers
Use code GABLz for 10% discount on all tickets
www.sharepointeurope.com

.NET Core 3.0 - What's new?

  • 1.
    .NET Core 3.0– What's New? christian@christiannagel.com @christiannagel https://csharp.christiannagel.com
  • 2.
    Topics C# 8 &.NET Core 3.0 ASP.NET Core 3.0 WPF & .NET Core
  • 3.
    Christian Nagel • Training •Coaching • Consulting • Development • Microsoft MVP • www.cninnovation.com • csharp.christiannagel.com
  • 4.
    C# 8 &.NET Core
  • 5.
    .NET Standard 2.1 • Reflection.Emit •Brotli • Span, APIs • DbProviderFactories • ITuple Features C# 8 Features Not supported by .NET Framework
  • 6.
    Smaller C# 8Features using declaration switch expression more pattern matching
  • 7.
    C# 8 –Async Streams Before C# 8, await could be used to wait for a single result IAsyncDisposable, IAsyncEnumerable, IAsyncEnumerator foreach and yield extended with async semantics
  • 8.
    C# 8 –Indices and Ranges • Span<T> allows reference a memory sequence • Safe code, fast access, no object copy • .NET Core 2.2 method overloads with spans • Use C# 8 Ranges to access arrays, strings… • .NET Core 3.0 faster, e.g. JSonDocument, Utf8JsonReader, UTF8JsonWriter
  • 9.
    C# 8 – Nullable Reference Types •Reference Types are not nullable anymore • Get rid of NullReferenceException • Breaking change • Opt-in (project, code regions)
  • 10.
    Nullability Annotation Guidance • .NETCore annotation in progress • Do annotate all new APIs • Consider changing the contracts if there's a different de facto use • Do continue to validate arguments • Do not remove existing argument validation • Avoid making changes while annotating unless it's a bug fix • some?.Method() • https://github.com/dotnet/corefx/blob/ma ster/Documentation/api- guidelines/nullability.md
  • 11.
  • 12.
  • 13.
    ASP.NET Core 3 • Generichost in Templates • Service configuration simplified • Endpoint Routing • SignalR Client-to-Server Streaming • JSON Serialization • Worker Service Template • gRPC Template
  • 14.
    Blazor • Components forthe Web • Based on Syntax of Razor Pages • Client-Side Components make use of WebAssembly • Server-Side Components communicate via SignalR • Server-Side Components released with .NET Core 3 • Client-Side Components released with a later .NET Core 3 version
  • 15.
    WPF and .NETCore Does WPF have a future?
  • 16.
    WPF (.NET Framework) & Windows Runtime WPFApp • Use Some Windows Runtime APIs Packaging (Desktop Bridge) • Use more Windows Runtime APIs App-Service WPF – UWP • Desktop Bridge & App Service • Use all Windows Runtime APIs
  • 17.
    XAML Islands UWP Controlsfor WPF & Windows Forms Wrappers for Ink, Map, Media Create your own! Windows Community Tookit
  • 18.
    WPF & .NET Core NewProject File All C# 8 & .NET Core Features Use the Windows Runtime Side-by-side Runtime Self-contained Exes
  • 19.
    Interop Use the Portability Analyzer Windows CompatibilityPack COM Interop coming WPF only runs on Windows!
  • 20.
    Summary • C# 8& .NET Core • ASP.NET Core • WPF & .NET Core
  • 21.
  • 22.
    Actions • Use C#8 • Annotate your applications & libraries • Use .NET Core 3 • Prepare for ASP.NET Core 3 • Be open for new application models • Use the portability analyzer for WPF • WPF & .NET Core • https://github.com/christiannagel • https://csharp.christiannagel.com • https://docs.microsoft.com • https://github.com/windows-toolkit/ • https://github.com/dotnet/
  • 23.
    A BIG thankyou to local sponsors!
  • 24.
    Another BIG thankyou to the 2019 Global Sponsors!
  • 25.
    The European SharePoint,Office 365 & Azure Conference 4 Days 2,500 Delegates 150+ Sessions 120 Speakers Microsoft Azure Keynote, 40 Azure Sessions, Azure Full Day Tutorials, Expert Global Azure Speakers Use code GABLz for 10% discount on all tickets www.sharepointeurope.com