Digest - .NET Conf 2021 - Focus on Windows and More!

Digest of the free virtual event at https://focus.dotnetconf.net held February 25th, 2021 with a focus on Windows desktop development plus assorted links and blog posts for .NET 6 Preview 1 and Visual Studio.

There was not a lot of new stuff at the conference, see previous digest from .NET Conf 2020 covering .NET 5 at Digest - .NET Conf 2020 for more content 😁.

Announcements and Blog Posts

A few links can be found below. Most are unrelated to the .NET Conf.

Introducing the .NET Upgrade Assistant Preview

Summary: Cathy Sullivan introduces .NET Upgrade Assistant announced at .NET Conf. This is covered a bit in the videos section with a link to video from .NET Conf and me trying out the tool on a project and failing 😅.

Announcing .NET 6 Preview 1

Summary: Very long and detailed post about everything .NET 6 Preview 1 by Rich Lander.

ASP.NET Core updates in .NET 6 Preview 1

Summary: Sourabh Shirhatti covers “what’s new in ASP.NET Core in .NET 6 Preview 1”

  • Support for IAsyncDisposable in MVC
  • DynamicComponent
  • Input ElementReference exposed on relevant components
  • dotnet watch now does dotnet watch run by default
  • Nullable reference type annotations

Announcing Entity Framework Core 6.0 Preview 1

Summary: Lots of new attributes it seems.

Visual Studio 2019 v16.9 and v16.10 Preview 1 are Available Today!

Summary: Jacqueline Widdis covers a few very nice improvements and .NET productivity features available in Visual Studio 2019 v16.9 just released. For C#:

  • Remove Unused References
    Remove Unused References
  • Simplify LINQ Expressions
    Simplify LINQ Expressions
  • New Completion Options - e.g. completion for Enum values when a type is known even if the Enum value is not entered.
    New Completion Options

New Dynamic Instrumentation Profiling for .NET

Summary: Sagar Shetty introduces the new dynamic instrumentation tool. This tool shows the exact number of times your functions are called and is faster than our previous static instrumentation tool. It also supports .NET Core instrumentation without needing PDBs.

Dynamic Instrumentation Profiling

Internals of the POH

Summary: Maoni Stephens writes about the .NET Pinned Object Heap introduced in .NET 5.

The 8 most missing features in C#

Summary: Konrad Kokosa lists results of a twitter poll about missing C# features. The compiled wishlist being:

  1. Discriminated unions
  2. First class void/aka Unit
  3. Pipe operator
  4. Type interference of methods
  5. Anonymous interface implementation
  6. Shapes aka type classes
  7. Primary constructors
  8. constexpr from C++

You can see a status table of C# language features on GitHub at Language Feature Status. Personally I wish for value type records e.g. record struct, which is being worked on.

F# and F# tools update for Visual Studio 16.9

Summary: Philip Carter covers the major improvements made by category:

  • .NET 5 scripting for Visual Studio
  • New productivity features for Visual Studio
  • Tooling performance and responsiveness improvements
  • Core compiler improvements


I have selected a few videos I found interesting below incl. full playlist of all videos from the conference. With summaries some of which are just copies of the official summary.

.NET Conf: Focus on Windows Playlist

.NET Conf: Focus on Windows Playlist

Summary: 17 videos excl. the full day stream.

.NET Conf 2021 - Focus on Windows LIVE

.NET Conf 2021 - Focus on Windows LIVE

Summary: Full length live video.

Welcome to .NET Conf: Focus on Windows

Welcome to .NET Conf: Focus on Windows

Summary: Scott Hunter and Olia Gavrysh welcomes everybody with an overview of what’s to come incl. changes in .NET 5 with relation to Windows desktop applications.

Upgrading .NET Desktop Apps from .NET Framework to .NET 5

Upgrading .NET Desktop Apps from .NET Framework to .NET 5

Summary: Cathy Sullivan covers the new upgrade-assistant for upgrading from .NET Framework to .NET 5. Covering upgrading BabySmash from .NET Framework 3.5 to .NET5 and a larger project.

To put it through some rough testing I tried using it on a solution with many projects incl. an WPF application and several console applications. This had already been ported to new SDK csproj, but is targeting net461. Below some notes on what I did in Powershell.

> dotnet tool update -g try-convert
You can invoke the tool using the following command: try-convert
Tool 'try-convert' (version '0.7.212201') was successfully installed.

> dotnet tool install -g upgrade-assistant
You can invoke the tool using the following command: upgrade-assistant
Tool 'upgrade-assistant' (version '0.2.212405') was successfully installed.

> upgrade-assistant .\SOLUTIONNAME.sln
[Next step] Select an entrypoint
> 1 # Selecting 1 since that is the primary project - WPF app
[Next step] Select project to upgrade
# A list of projects and their order is listed which looks fine
[Next step] Back up project
> 2 # Skipping since in git
# Then proceeds to do conversion (not needed since already SDK project)
[18:23:20 INF] Initializing upgrade step Convert project file to SDK style
[18:23:20 ERR] Failed to open project PROJECTPATH.csproj; Exception: System.InvalidOperationException: Sequence contains no matching element
   at System.Linq.ThrowHelper.ThrowNoMatchException()
   at System.Linq.Enumerable.Single[TSource](IEnumerable`1 source, Func`2 predicate)
   at Microsoft.DotNet.UpgradeAssistant.MSBuild.MSBuildProject.get_TFM() in /_/src/components/Microsoft.DotNet.UpgradeAssistant.MSBuild/MSBuildProject.cs:line 266
   at Microsoft.DotNet.UpgradeAssistant.MSBuild.MSBuildProject.<get_TransitivePackageReferences>g__GetTransitiveDependencies|26_0() in /_/src/components/Microsoft.DotNet.UpgradeAssistant.MSBuild/MSBuildProject.cs:line 203
   at Microsoft.DotNet.UpgradeAssistant.MSBuild.MSBuildProject.get_TransitivePackageReferences() in /_/src/components/Microsoft.DotNet.UpgradeAssistant.MSBuild/MSBuildProject.cs:line 194
   at Microsoft.DotNet.UpgradeAssistant.MSBuild.MSBuildProject.get_Components() in /_/src/components/Microsoft.DotNet.UpgradeAssistant.MSBuild/MSBuildProject.cs:line 74
   at Microsoft.DotNet.UpgradeAssistant.Steps.ProjectFormat.TryConvertProjectConverterStep.InitializeImpl(IUpgradeContext context) in /_/src/steps/Microsoft.DotNet.UpgradeAssistant.Steps.ProjectFormat/TryConvertProjectConverterStep.cs:line 108
> 2 # The tool continues so trying to skip conversion
[Failed] Update TFM
# However, Update TFM step fails too with the same error
# At this point the upgrade assistant has made no changes to project files

Bummer… notorious LINQ .Single() exception, seen that too many times. Assumptions are always wrong. Pretty sure our csproj customizations are not supported 😅 Note we have tried changing the TFM to net5.0 manually and this builds fine, but fails to run the app with no meaningful error. It just stops during startup.

XAML Productivity Tooling Enhancements in Visual Studio

XAML Productivity Tooling Enhancements in Visual Studio

Summary: Dmitry Lyalin takes a tour of what’s new for Windows desktop developers building applications using WPF and UWP apps with Visual Studio. Covers improvements in tooling such as what’s new in XAML data binding, diagnostics, XAML designer and Hot Reload. Nothing really new here, but great things just released in Visual Studio 2019 16.9.

Deploying Windows Apps with ClickOnce on .NET 5

Various ways you can deploy desktop applications

Summary: Olia Gavrysh and Jasmine Greenaway cover various ways you can deploy desktop applications:

  • x-copy
  • MSI
  • ClickOnce
  • Windows Store
  • MSIX
  • Third-party solutions

Which does not cover my favorite for complex installers; a .NET Framework application with the application and it’s resources embedded. This gives you full control over the installation experience using normal C# code. This depends on knowing the minimum .NET Framework version being available on target machines.

An Opinionated Way to Deploy Windows Apps using GitHub Actions

An Opinionated Way to Deploy Windows Apps using GitHub Actions

Summary: Great talk by Isaac Levin about how to automate “deploying” a desktop application via GitHub Actions to:

  • Chocolatey
  • Windows Store

Yaml galore, hundreds of lines of it. Having spent a lot of time on build and CI definitions I can definitely appreciate the collected efforts to get all the things being automated working. Local testing of these yaml pipelines is a huge issue, though, for quicker dev loop. Code can be found at https://github.com/isaacrlevin/presencelight

Windows APIs Everywhere in .NET

Windows APIs Everywhere in .NET

Summary: Angela Zhang and Mike Ballista on “Unlock the full potential of your .NET applications by taking advantage of the native platform APIs in Windows. In this demo heavy session, you’ll learn how we’ve simplified Windows development by making access to both WinRT and Win32 APIs easy in .NET 5.”

Building .NET Hybrid Apps with Blazor

Building .NET Hybrid Apps with Blazor

Summary: Awesome talk by Daniel Roth about all things Blazor incl. running Blazor inside native desktop apps e.g. via WebView2.

Project Reunion

Project Reunion

Summary: Zanya and Migual Ramos talk about the goal of Project Reunion. The capabilities of Project Reunion and how you can take advantage of it from your .NET applications. This includes WinUI 3.

The Future of Native Apps Development in .NET 6

The Future of Native Apps Development in .NET 6

Summary: Maddy Leger and David Ortinau give a quick introduction to .NET MAUI (Multi-platform App UI aka Xamarin vNext), the premise of it and an overview of how it works. As always with great enthusiasm. 😁 At the end a tentative and loose timeline is given. No promises!

Release Includes Audience
.NET 6 Preview 1 Runtime and BCL. Mobile workloads. Contributors
.NET 6 Preview 2 .NET MAUI views, layouts Android, iOS, MacOS. Contributors
.NET 6 Preview 3&4 .NET MAUI most controls, layouts, pages, services. Adding WinUI4. You! Kick the tires.
.NET 6 Preview 5 -> RC .NET MAUI fills the remaining gaps. Responds to feedback. Everyone!

Download Videos for Offline Viewing

Most videos can be found below for direct download: