.NET Core 3.0 Previews: Desktop App Support and C# 8.0 nullable references

Expanding .NET horizons. We explore WPF/Windows Forms, C# 8.0 nullable reference types, and gRPC starters.

VP
SHIVAM ITCS
·29 April 2019·10 min read·1 views

Technical Overview & Strategic Context

While .NET Core 1.x and 2.x established C# as a powerful cross-platform runtime for web services, they did not support desktop applications (WPF and Windows Forms), which restricted development to the classic .NET Framework. The previews of .NET Core 3.0 in mid-2019 resolved this constraint by adding support for Windows desktop applications, introducing C# 8.0 nullable reference types, and adding native gRPC support, simplifying the modernization of legacy enterprise software.

Architectural Principle: Migrate legacy .NET Framework desktop services to .NET Core 3.0. Use C# 8.0 nullable reference types to find null references at compile time.

Core Concepts & Architectural Blueprint

.NET Core 3.0 adds WPF and Windows Forms support, allowing desktop apps to leverage the performance benefits of CoreCLR. C# 8.0 introduces nullable reference types (nullable context), enabling the compiler to identify potential null pointer errors statically, similar to Kotlin and Swift.

Performance & Capability Comparison

Feature Layer.NET Core 2.x Standard.NET Core 3.0 StandardDevelopment Benefit
Desktop FrameworksNot supported (Windows Server only)Supported (WPF & Windows Forms)Enables desktop app migrations
Nullable ReferencesStandard reference types (always nullable)Explicit nullable checking contextEnforces compile-time null checks
API ServicesStandard HTTP web servicesNative gRPC integration templatesEnables high-performance API calls

Implementation & Code Pattern

To write null-safe code in C# 8.0, developers should adopt these coding standards:

  • Enable the nullable context inside project configuration files.
  • Declare variables that can hold null using union types (e.g. Student?).
  • Use the null-forgiving operator (!) when the compiler cannot verify initialization.
  • Use type guards to verify variable types before accessing properties.
xmlcode
<!-- Project configuration file (.csproj) enabling C# 8.0 nullable context -->
<Project Sdk="Microsoft.NET.Sdk">

  <PropertyGroup>
    <OutputType>Exe</OutputType>
    <TargetFramework>netcoreapp3.0</TargetFramework>
    <!-- Enable C# 8.0 nullable reference types context -->
    <Nullable>enable</Nullable>
    <LangVersion>8.0</LangVersion>
  </PropertyGroup>

</Project>

Operational Governance & Future Outlook

.NET Core 3.0's introduction of desktop app support and C# 8.0 nullable reference types simplified the modernization of legacy .NET systems, helping developers write cleaner, safer code.

VP
Vijay Paliwal
Founder, SHIVAM ITCS · 18+ years enterprise & AI engineering
MCA · Ex-HiveGPT USA · Ex-Social27 Seattle
.NET Core 3.0 Previews: Desktop App Support and C# 8.0 nullable references | SHIVAM ITCS Blog | SHIVAM ITCS