/dotnet-core-3-wpf

A simple wpf application to demonstrate its functionality in .NET Core 3.0

Primary LanguageC#

dotnet-core-3-wpf

A simple wpf application to demonstrate its functionality in .NET Core 3.0.

Kata requirements

For this kata there are two specific requirements: latest preview .NET Core 3.0 and latest preview VS 2019. It would be worth installing this before you attend the meetup - it takes around 40 mins.

Prereqs

.NET Core 3.0 (latest preview)

https://dotnet.microsoft.com/download/dotnet-core/3.0

Tuesday Sept 17th - For Windows you should have: dotnet-sdk-3.0.100-rc1-014190-win-x64 To test: dotnet --version

VS 2019 (latest preview)

	https://visualstudio.microsoft.com/vs/preview/
	Community - unless you have a personal Visual Studio Professional or Enterprise license

Upgraded from 16.2.0 Preview 2.0 - Tuesday Sept 17th - 16.3.0 Preview 4.0

Or for VS Code:

https://devblogs.microsoft.com/dotnet/announcing-net-core-3-preview-3/

A new preview C# extension update is available for VS Code that includes the latest C# compiler (aligned with .NET Core Preview 3 and Visual Studio 2019 Preview 4), which is required to use new C# 8.0 syntax. You need to download the extension and then install it as a VSIX in VS Code (VSIX install is in Extensions settings).

Kata steps

Master branch

The initial master branch simply is a blank WPF application, with a single Hello Worldbutton that does nothing.

Other brances

The other branches that have the naming convention of <stage_number>_<description_of_stage>, will be used to demostrate various interesting aspects of features in .NET Core 3.0

Create a WPF app

To create a WPF app you simply need to create a WPF App (.NET Core) project in VS 2019 Preview.

Create a console application

Using a console application to play around with nullable reference types.

Useful resources

What is it: https://docs.microsoft.com/en-us/dotnet/csharp/nullable-references Tutorial: https://docs.microsoft.com/en-us/dotnet/csharp/tutorials/nullable-reference-types

Enalbing nullable reference types

Add these two elements to the PropertyGroup of your .csproj file:

    <LangVersion>8.0</LangVersion>
    <Nullable>enable</Nullable>