Note: This is the published version of my free, weekly newsletter, The .NET Stacks. It was originally sent to subscribers on December 14, 2020. Subscribe at the bottom of this post to get the content right away!
👋 Happy Monday, everyone! This is the very last issue of 2020. Every year, I try to take the last few weeks off to decompress and unplug—considering how 2020 went, this year is no exception.
📰 News and announcements
GitHub Universe 2020 occurred this week, and Shanku Niyogi has all the details. (As .NET developers, the gap between .NET and GitHub will continue to narrow as Microsoft will pivot to GitHub Actions as its long-term CI/CD solution.)
The GitHub site itself stole the show. Dark Mode is now supported natively—you can delete your favorite browser extensions that do this for you. Also, the front page is a site to behold. Just hover over a globe to see commits in real-time from across the world:
As for actual development features, we now see the ability to auto-merge PRs, discussions, CD support. Also, companies can now invest in OSS with the GitHub Sponsors program.
What does this Sponsors news mean for the .NET OSS ecosystem? That is a complicated question. .NET PM Immo Landwerth wrote about it:
Today, we’re usually reactive when it comes to library & framework investments. By the time we know there is a need for a library we routinely research existing options but usually end up rolling our own, because nothing fits the bill as-is and we either don’t have the time or we believe we wouldn’t be able to successfully influence the design of the existing library. This results in a perception where Microsoft “sucks the air” out of the OSS ecosystem because our solutions are usually more promoted and often tightly integrated into the platform, thus rendering existing solutions less attractive. Several maintainers have cited this as a reason that they gave up or avoid building libraries that seem foundational.
To avoid this, we need to start engaging with owners of existing libraries and work with them to increase their quality … it should become a general practice. We should even consider an ongoing work item to actively investigate widely used libraries and help them raise the quality or tighten their integration into the .NET developer experience.
Check out the full discussion here:
Claire Novotny wrote two posts this week about using Source Link with Visual Studio and Visual Studio Code. Source Link has been around a few years, but is now getting the full treatment. If you aren’t familiar, it’s “a language and source-control agnostic system for providing first-class source debugging experiences for binaries.” This helps solve issues when you can’t properly debug an external library (or a .NET library).
Considering most library code is openly available from a GitHub HTTP request, debugging external dependencies is a lot easier these days. If a library has enabled Source Link, you can work with the code as you would with yours: setting breakpoints, checking values, and so on. I can see benefit personally in something like
Newtonsoft.Json—it’ll be easier to pinpoint any silly serialization issues I may or may not be causing.
Speaking of Visual Studio, Jacqueline Widdis rolls out Visual Studio 2019 v16.9 Preview 2. We’re seeing a few quality-of-life improvements—
using directives are automatically inserted when pasting types, and VS automatically adds semicolons when creating objects and invoking methods.
Speaking of quality-of-life, the Visual Studio team is aware of the underwhelming reception to the Git integration updates added with v16.8. They have a survey out to understand why a lot of folks are turning off the feature. They’re listening, so fill out the survey to have your voice heard.
Xin Shi discusses Infer#, which brings you interprocedural static analysis capabilities to .NET. It currently helps you detect null dereferences and resource leaks. They’re working on race condition detection and thread safety violations.
Igor Velikorossov announced what’s new in the Windows Forms runtime for .NET 5. They include a new
ListView enhancements, upgrades to
FileDialog, and performance and accessibility improvements.
Anthony Chu announces that .NET 5 support in Azure Functions is now in early preview. For this to happen, .NET 5 functions need to run in an out-of-process language worker separate from the Azure Functions runtime. As a result, a .NET 5 app runs differently than a 3.1 one; you build an executable that imports the .NET 5 language worker as a NuGet package. Check out the repository readme for the full details. The .NET 5 worker will be generally available in early 2021.
In other Azure news, Richard Park announced the new Azure Service Bus client libraries. Following the guidelines for new Azure SDKs, it’s a culmination of months of work and the post includes details on how its making working with core Service Bus functionality quite a bit easier.
Also, the November 2020 release of the Azure SDKs include the Service Bus updates, as well as updates for Form Recognizer, Identity, and Text Analytics.
Okta has released a new CLI. With one
okta start command, it looks like it can register you for a new account (if you don’t have one) and work with a sample ASP.NET Core MVC application.
Dev tip: nested tuple deconstruction
I’m a fan of deconstructing C# objects using tuples. Did you know you can nest them? Even though it’s been around awhile, I didn’t.
David Pine shows us how:
📆 A 2020 .NET Stacks recap
It’s been a busy 2020 at The .NET Stacks, even if we’ve only been around since the end of May. What’s happened since then? Let’s recap.
The first issue covered Microsoft Build. We talked about Project Tye and YARP. We discussed native .NET feature flags and local k8s dev in Visual Studio, EF Core, gRPC-Web and C# 9, Blazor Mobile Bindings, Azure SDKs and test automation, and how C# 9 has become more functional. Then, we discussed Project Coyote and a new Razor editor, .NET’s approachability, Newtonsoft’s new rule and using async void, and what the future of Azure DevOps looks like.
Then, we covered .NET 5 Blazor improvements, NuGet changes and many-to-many in EF Core 5, C# source generators, app trimming, Blazor CSS isolation, the fate of .NET Standard, and a Microsoft Ignite recap. We introduced route-to-code and talked about what’s happening with IdentityServer, talked about Azure Static Web Apps, got excited about .NET 5 and the .NET Foundation, and talked about how .NET 5 support works.
After that, we talked about Blazor’s production readiness, C# 9 records, and celebrated the official release of .NET 5. We gave some love to ASP.NET Core 5, talked about the future of APIs in ASP.NET Core MVC, and talked about how to switch controllers to route-to-code. And now, we’re here.
Along the way, we’ve had some wonderful interviews from community leaders. We discussed the PresenceLight project, writing about ASP.NET Core from A-Z, the Azure community, Entity Framework Core, the Microsoft docs, ML.NET, F# and functional programming (from Microsoft and the community), and Coravel. I’ve got interviews coming from LaBrina Loving, Layla Porter, Cecil Phillip, and Steve Sanderson—and welcome any suggestions for future interview subjects.
I started this newsletter as an experiment to keep my mind sharp during the pandemic, and I’m happy to see how much its grown. I hope you enjoy it, but I’m always open to feedback about how I can make it better for you. I’ll have a survey in early 2021, but if you have anything to share don’t hesitate to reach out.
See you in 2021! I hope you and your family have a safe and relaxing holiday season.
🌎 Last week in the .NET world
🔥 The Top 3
- Chris Woodruff implements an effective architecture for ASP.NET Core Web API.
- Martin Ullrich talks about MSBuild tips and tricks.
- Andrew Lock uses action results and content negotiation with “route-to-code” APIs.
📅 Community and events
- The .NET Open Source Days is taking place on December 18.
- The .NET Docs Show talks to our Marvel-ous friend Shahed Chowdhuri about .NET, C#, and Azure.
- For the .NET community standups: ASP.NET talks about Material.Blazor, Machine Learning discusses submissions for the Virtual ML.NET Hackathon, and Languages & Runtime talk about Infer#.
🌎 Web development
- Jon Hilton writes about dark mode for web apps using Blazor and Tailwind CSS.
- Kevin Griffin writes about managing SignalR ConnectionIds.
- John Gathogo passes OData query options in the request body.
- Marinko Spasojevic writes about user registration with Angular and ASP.NET Core Identity, and also writes about custom validators and handling errors with Angular and ASP.NET Core Identity.
- David Grace installs ASP.NET Core in a .NET 5 app on Ubuntu 20.04.
- Ricardo Peres writes about being cautious with async file uploads in ASP.NET Core.
⛅ The cloud
- Chris Noring writes about managing .NET feature flags locally and with Azure.
- Tom Kerkhove monitors Azure Service Bus topic subscriptions.
- Gergely Sinka deploys a .NET Core app to all the clouds.
- Simon Timms writes about remote debugging for Azure Functions.
- Rami Honig kicks off a series on using MongoDB with C#.
- Damien Bowden uses multiple APIs in Angular and ASP.NET Core with Azure AD authentication.
- Abhijit Jana works with Azure Communication Services.
- Raymond Chen parses ETL traces with the EventLogReader.
- Julie Lerman writes about domain-driven design in C#.
- Dave Brock uses local function attributes with C# 9.
- Arthur Casals talks to Phillip Carter about what’s new in F#.
- Khalid Abuhakmeh writes about common use cases for .NET reflection.
- Thomas Levesque continues his series on using C# 9 records as strongly-typed IDs.
- Carmel Eve writes about the Proxy pattern in C#.
- Niels Swimberghe warns you about rethrowing your exceptions the wrong way.
- Diogo Souza creates a CRUD app with Suave and F#.
- Thomas Ardal predicts Die Hard fans with ML.NET and C#.
- Tomasz Pęczek writes about cryptography improvements in .NET 5.
- Scott Hanselman writes about customizing your PowerShell prompt with PSReadLine.
- David Ramel writes about the community requesting Visual Studio for Linux.
- Lee Briggs writes about embracing Kubernetes.
- Rachel Appel uses C# 9 records and init-only properties in ReSharper and Rider 2020.3.
- Dave Brock automates a Markdown links page (this one!) with Pinboard and C#.
- Xiaoping Wu uses EF Core 5.0 in .NET Core 3.1 with MySQL.
- James Montemagno writes about 5 essential NuGet packages for new Xamarin projects.
- Leomaris Reyes writes about the RadPopUp control.
- Denys Fiediaiev loads an idiom-specific storyboard in Xamarin.iOS with MvvmCross.
- The Xamarin Podcast wraps up 2020 and looks ahead to 2021.
- The Complete Developer Podcast discusses dependencies in unit testing.
- .NET Rocks talks to Georgia Nelson about building a TwitchBot in Blazor.
- The 6 Figure Developer podcasts talks to Egil Hansen about bUnit.
- Serverless Chats talks about statefulness and serverless with Rodric Rabbah.
- Visual Studio Toolbox uses an existing .NET Core project template, and also creates .NET Core projects with the command line.
- Scott Hanselman talks about basic home networking.
- The ASP.NET Monsters work through single-file applications in .NET 5.
- The ON.NET Show talks to James Newton-King about gRPC-Web, introduces microservice patterns, and discusses GraphQL schema design.