The .NET Stacks #35: 🔑 Nothing is certain but death and expiring certificates
Welcome to another week, everybody. I’ve been getting some complaints; I haven’t had a bad joke in a while. I know it’d be a nice shot in the arm, but now’s not the time to be humerus.
We’re covering a lot of little things this week, so let’s get started.
This week, the .NET team announced improvements to the new Razor editor in Visual Studio (obviously in response to my complaints last week).
Six months ago, the team announced a preview of an experimental Razor editor based on a common Razor language server. (We talked about it in Issue #9, if you want all the specifics.) It’s now available in the latest Visual Studio preview (16.9 version 3).
The new Razor editor allows the team to enable C# code actions more easily—with this update, Razor can help you discover using statements and null checks. This also extends to Blazor. Check out the blog post for details (and you can fill out a survey about syntax coloring.)
The NuGet team needed some #HugOps this week as they dealt with an expired certificate that temporarily broke .NET 5 projects running on Debian Linux.
Here’s what the NuGet team had to say:
This is because of an issue reported in the ca-certificates package in which the root CA being used are not trusted and must be installed manually due to Symantec Issues. Debian removed the impacted Symantec certificate from their ca-certificates package in buster (Debian 10) impacting all user … The Debian patch was too broad in removing the certificate for all uses and created the error messages seen today.
For some good news, the NuGet website has a new Open in FuGet Package Explorer link that allows you to explore packages with FuGet.
This week, I wrote about Signed HTTP Exchanges. In our interview with Blazor creator Steve Sanderson, he mentioned it as a way to potentially help speed up runtime loading for Blazor WebAssembly applications by using it as a type of cross-site CDN cache.
Here’s what he told us:
It’s conceivable that new web platform features like Signed HTTP Exchanges could let us smartly pre-load the .NET WebAssembly runtime in a browser in the background (directly from some Microsoft CDN) while you’re visiting a Blazor WebAssembly site, so that it’s instantly available at zero download size when you go to other Blazor WebAssembly sites. Signed HTTP Exchanges allow for a modern equivalent to the older idea of a cross-site CDN cache. We don’t have a definite plan about that yet as not all browsers have added support for it.
It isn’t a sure thing because the technology is still quite new, but it’s a promising idea to overcome the largest drawback of using Blazor WebAssembly.
I’ve written about prerendering Blazor WebAssembly apps. It’s a little weird, as you give up the ability to host your app as static files. Why not host over Blazor Server, then?
This week, Andrew Lock wrote about a creative approach where you can prerender an app to static files without a host app. It does have tradeoffs—you need to define routes beforehand and it doesn’t work well if you’re working with dynamic data—but it’s worth checking out if it fits your use case.
At the Entity Framework community standup this week, they discussed the MSBuild.Sdk.SqlProj
project with Jonathan Mezach. Already sitting at 42k downloads from GitHub, it’s an SDK that produces .dacpac files from SQL scripts that can be deployed using SqlPackage.exe
or dotnet publish
. It’s like SQL Server Data Tools but built with the latest tooling.
You can check out Jonathan’s announcement on his blog to understand how it all works and his motivations for building it.
🌎 Last week in the .NET world
🔥 The Top 3
- Daniel Roth writes about improvements to the new Razor editor in Visual Studio.
- Andrew Lock prerenders a Blazor WebAssembly app to static files without an ASP.NET host app.
- Jimmy Bogard writes how to choose a ServiceLifetime.
📢 Announcements
- Kayla Cinnamon announces Windows Terminal Preview 1.6.
- Mads Kristensen writes about new ways to provide Visual Studio feedback.
- Gerald Versluis introduces the Xamarin Community Toolkit.
- PostSharp introduces Project Caravela, a Roslyn-based aspect framework.
- W3C welcomes Open Web Docs, while Microsoft and Mozilla also write about it.
- As David Ramel writes, GitHub ships Enterprise Server 3.0 Release Candidate.
- In JetBrains news, Matthias Koch writes about the Rider 2021.1 roadmap, Matt Ellis provides a ReSharper 2021.1 roadmap, and Friedrich von Never has an interesting Twitter thread about how they debug Blazor WebAssembly. .
- David McCarter updates his dotNetTips utility.
📅 Community and events
- For the community standups, ASP.NET talks about better Razor editing in Visual Studio and Entity Framework introduces MsBuild.Sdk.SqlProj.
- The .NET Docs Show talks about creating an OSS mobile app with Xamarin and Azure.
🌎 Web development
- Dave Brock writes about using Signed HTTP Exchanges to help with runtime loading in Blazor WebAssembly.
- Marinko Spasojevic uses roles in Blazor Web Assembly hosted applications.
- Jeetendra Gund uses the Select tag helper in ASP.NET Core MVC.
- Marinko Spasojevic writes about authentication in Blazor WebAssembly hosted application.
- Changhui Xu writes about uploading multiple files with Angular and ASP.NET Web API.
- Anthony Giretti adds a gRPC service reference from a remote protobuf over Route-To-Code.
🥅 The .NET platform
- Konrad Kokosa continues writing about .NET GC internals.
- Andrea Chiarelli creates a .NET project template.
⛅ The cloud
- Ryan Palmer automates database deployments with Azure and Farmer.
- Peter De Tender demystifies service principals and managed identities.
- Shelton Graves writes about choosing an event-driven architecture.
- Damien Bowden implements an OAuth device code flow with Azure AD and ASP.NET Core.
- Daniel Krzyczkowski builds out his ASP.NET Core API with an Azure Service Bus.
📔 Languages
- Jon Skeet writes an OSC mixer control in C#.
- Luca Bolognese uses C# source generators to create an external DSL.
- Karthik Chintala writes about the Observer design pattern.
- Khalid Abuhakmeh gets you started with .NET 5 source generators.
- Jason Roberts writes about switch expressions.
- Jon P. Smith uses ValueTask to create methods that work as sync or async.
- Matthew Crews writes about scheduling jobs in F# for maximum efficiency.
🔧 Tools
- Rick Strahl continues writing about the Chromium WebView2 control and .NET.
- Elton Stoneman builds Docker images quickly with GitHub Actions and a self-hosted runner.
- Jon P. Smith updates a database schema without using EF Core’s migrate feature.
- ErikEJ writes about advanced automated deployments of an Azure SQL database with Azure DevOps.
- Dane Vinson writes about the JsonEnvelopes library that helps serialize and deserialize message receivers.
- Microsoft announces Windows ARM64 support for CMake projects in Visual Studio.
- Mark-James McDougall plots graphs from CSV files in F# using XPlot.
📱 Xamarin
- Leomaris Reyes replicates a talent casting UI.
- The Xamarin Show discusses the Xamarin Community Toolkit.
- Luis Matos warns: don’t use CollectionView inside ScrollView in Xamarin.Forms.
🏗 Design, testing, and best practices
- Stephen Cleary writes about retrieving results from async messaging.
- Derek Comartin writes about avoiding a big ball of mud.
- Changhui Xu writes integration tests for ASP.NET Core Web APIs using MSTest.
- Piotr Martyniuk writes about connecting microservices.
🎤 Podcasts
- The .NET Rocks podcast talks to Julie Lerman about .NET 5.
- On Yet Another Podcast, Jesse Liberty talks C# with Mads Torgersen.
- The Adventures in .NET podcast continues talking with Jon Skeet.
- The .NET Core Show talks about Xamarin with Luce Carter.
🎥 Videos
- The ON.NET Show talks about using Azure AD B2C for authenticating users, and also about distributed applications with ZeroMQ.
- Jeremy Likness and Abel Wang talk about hosting NuGet packages.
- Brigit Murtaugh starts a beginner’s series on dev containers.
- At Technology and Friends, David Giard talks with Dustin Campbell about WinForms support for Visual Studio Designer.