Last Week in .NET #20 – Microsoft reclaiming the “Creepy Spying Company” mantle

In what I can only describe as a “lead magnet”, here’s a copy of my weekly .NET newsletter, creatively titled “Last Week in .NET”. I’m posting it here in the vain hopes that you’ll sign up for the newsletter or subscribe to the podcast. ♥

Welcome to Last week in .NET; and last week was a holiday week so things will be lighter than usual.

📝 Matthew Jones talks about Expressions, Lambda, and Delegates in simple terms. Lambdas were one of the hardest concepts for me to learn; and 12 years later, I’m glad I did.

I still don’t use Func<T> and Action<T> to the extent I’ve seen in other codebases; but that’s because I don’t want the maintenance programmer to hunt me down.

🔎 Why does JavaScript use 0 as January and 11 to denote December? Good @&*#ing question. Good news, is Hillel Wayne dove into old unix systems to find the answer. If you don’t follow Hillel’s work, you should.

🎥 David Fowler Deep Dives into the ASP.NET Core architecture. This is an incredible deep (and I mean deep) dive into the reasons why the ASP.NET Core framework behaves the way it does; provides a nice history of where we came from, and reminds me that we need a good MVC framework for ASP.NET Core but we’re probably not going to get it.

🎁 Do you write nuget packages? If so, you should know about the NuGetPackageExplorer. Also apparently it can help you find incorrect configurations for your packages

📝 Want to use C# 9 for your Xamarin projects? James Montamagno tells you how. For most of us, we’re still waiting for .NET 6 MAUI to unify the runtimes.

📝 Dave A Brock shows you how to isolate and test your service dependencies in Blazor. This addresses one of my chief concerns about blazor; and it’s good that there are people minding the testing store.

📢 Visual Studio for Mac 8.8 now supports NuGet 5.8 The dirty secret about Visual Studio for Mac is that it’s MonoDevelop reskinned; and it has a long way to go to match the power of Visual Studio for Windows; but I’m glad for Microsoft putting effort into a Mac client.

📝 Do you like VB.NET, Winforms, and .NET 5 I’m sorry, I’m sorry, and good! Kidding aside; Winforms is still the way to build a line of business desktop application; and chances are if your business is at least 20 years old you have a lot of internal applications written in at least one of the three. Anyway, this blog post goes into how you can use all three together in .NET 5.

🎁 Versioning your .NET code doesn’t have to suck. How many times have you created a custom build script to versioning your releases? Do you use Git? Do you want to stop writing custom code to do this thing that should be available out of the box? Andrew Arnott has your back with NerdBank.GitVersioning.

🕵️‍♂️ Microsoft wants to make sure your employer knows when you’re working and when you’re slacking off. Microsoft has added a feature to allow you to calculate “productivity scores” for your ‘team members’ in Office 365, and there’s no word whether or not it compensates for Microsoft’s own terrible UI choices.

😂 Immo Landwerth (PM on the .NET Team), makes a funny about Microsoft naming: “People still complain about the .NET Core naming. Just keep in mind that it’s named by Microsoft so it’s a miracle we didn’t call it “.NET Framework without AppDomains, Remoting, and most of WCF but for multiple operating systems as long as you promise to run your cloud on Azure”. Yea, that about sums it up.

📝 How to implement CSS Isolation in .NET 5’s Blazor You now get “CSS Isolation” in blazor. What that really means is that now in Blazor, you can have CSS scoped to a component, just like in Angular (and probably other SPAs). This is a fundamental feature for SPAs, and I’m surprised it wasn’t in 1.0.

🤯 Do you have Assembly version conflicts? Trick question: We all do. Good news is that there’s an in-depth blog post that will help you resolve these issues and restore your sanity.

📝 Andrew Lock has a preview from his new book about how to apply the MVC design pattern to Razor Pages. It’s a bit of shoehorning, but let’s go with it.

📝 There’s an F# newsletter out with what’s new there F# is a great language; but I don’t spend a lot of time in it.

📝 Scott Hanselmen shows you how to create a Self-Contained Deployment with Single file Publish and Winforms on .NET 5 This is crucial for Desktop applications and far overdue. I hope this rekindles interest in desktop applications.

🐛 There’s a breaking bug change with .NET 5 and VB.NET that will cause you problems if you run into it. Be careful if you use VB.NET .? OR GreaterThan, And AndAlso; and my apologies to you if you’re listening to this instead of reading it.

😂 There’s a comic about Debugging tactics and how often we use them For some reason “The Ballmer Peak” wasn’t listed. I consider this an error.

And that’s what happened last week in .NET. It was the American Thanksgiving Holiday, and I hope you and yours enjoyed it. I’ll see you next week.

Last week in .NET #19 – Throwing TFMs at the Wall to see what sticks

In what I can only describe as a “lead magnet”, here’s a copy of my weekly .NET newsletter, creatively titled “Last Week in .NET”. I’m posting it here in the vain hopes that you’ll sign up for the newsletter or subscribe to the podcast. ♥

📢🐛Visual Studio 16.8 has been released; and it might have uninstalled the .NET Core 3.1 SDKs on your behalf.

🎲Random Street View shows you a place in the world randomly. Hopefully this gives you something fun to do during this holiday week while waiting for the clock to hit 5pm.

📢 Do you like the idea of using C# for scripting? dotnet-script provides that. Personally I’m of a mind that they should have modified C# for Scripting a long time ago and not invented Powershell, but we don’t all get what we want.

🛑 Github reverses course and re-enables the youtube-dl repository. The RIAA had issued a takedown notice, since the youtube-dl repository allows for command line accesss to Youtube. Initially Github caved (because they thought they had to?) and removed the repository; but after the Electronic Frontier Foundation (EFF) stepped in with a supporting letter as to why the RIAA was mistaken in their claim, Github re-enabled access to the repository and created safeguards so this “doesn’t happen again”.

💔 If you have a class with a private default constructor in .NET 5; SignalR can’t deserialize it. The author of this blog post suffered so we wouldn’t have to.

📝 AppVeyor has a helpful (short) blog post on Version pinning for .NET 5 and the .NET Core SDK. There’s something valuable here but I fear I’m missing the context to know what it is.

📢 .NET Framework November 2020 Security and Quality Rollup Updates have been released. This is a release of the “Preview” I mentioned a few weeks ago; although the word ‘security’ is in the title, there aren’t any security updates in this release.

🤦‍ Jimmy Bogard released a galaxy brain meme on how to see if a string is null in C# It’s funny and sad. It’s funny because it’s sad.

📝 You can see all the differences between the .NET Standard 2.1 and .NET Core 3.1 APIs vs .NET 5 here. It’s pretty cool to see all the API differences in one place.

📝 Roadmap for WinUI 3 should be out in the first half of 2021. I’ve said this before and I’ll say this again: I have no idea what WinUI is or how it’s different from all the other UI strategies Microsoft has had; but maybe we’ll get lucky and it’ll finally unify everything.

📢 Along the same vein, WinUI 3 Preview 3 has been released.

📝 Julie Lerman shows you how to deploy containerized .NET 5 applications using AWS’s fargate. Also maybe one day AWS will unify its containerization strategy.

🎥 Monsters weekly releases a video on how C# 9’s Pattern Matching can make your job as a developer easier.

🎥 There’s a new Git Experience in Visual Studio 2019 16.8. If you use the UI; let me know how much better it’s gotten.

💡 Exception Filters allow you to pare down what you’re catching, and as the old adage goes, if you can’t handle it, don’t catch it.

💡 Microsoft edge allows you to add ‘notes’ to a PDF document Keep this up, Edge and I may install you on my PC.

📝 Top 5 features of EF Core 5.0 from 4 Entity Framework Experts. While we’re running the numbers, it turns out there were 240 enhancements, 380 bug fixes, and around 200 updates to documentation, and to give you an idea, EF Core 3.1 was released On 3 December 2019; so all those changes were made in the span of 11 months.

📝 The Roslyn team wrote a blog post detailing what’s new in the .NET Productivity Realm If you use Visual Studio 2019, it’s worth your time to check this out since you’re likely to find something to help you out.

📝 Joseph Guadagno shows you how to add .NET 5 support to the Azure App Service I’m not sure why this is a thing we as developers have to do; but here we are.

📢 Microsoft Research released a fuzzing tool for HTTP and REST APIs. A fuzzer is a real life incarnation of the saying “Throwing spaghetti at a wall and see what sticks”.

📢 TypeScript 4.1 has been released. Here’s my periodic reminder to you that TypeScript does not respect SemVer and therefore not pinning to the exact version of TypeScript you’re using (major.minor.patch) is a good way to cause random build breakages whenever typescript releases a new version.

💡 Don’t use the TFM without the SDK, says .NET team. Basically if your TFM is readable, you’re not using the right thing. Include both the TFM and the SDK number so you’re pinned to the exact right thing.

📢 Microsoft.Data.SqlClient 2.1 has been released with lots of bug fixes and performance improvements — and they mean it this time.

📢 Microsoft’s WebView 2 now uses Chromium Edge for when you need an integrated web browser in your .NET application The joke here is that we’re stuck with Desktop UI toolchains but we’d all rather be using web toolchains.

And lastly,

📝 Explaining Chains, Funcs and Actions in C#. Honestly this all sounds a bit like a kink; but I assure you, it’s all SFW.

Did you like what you read? This is a weekly newsletter you can sign up for at https://www.lastweekin.net. If you’d prefer it in audio form (hi, we should be friends), you can subscribe to the podcast version at https://podcast.lastweekin.net.

Last Week in .NET #17 – EF stands for “Ever Frantically” shipping code

In what I can only describe as a “lead magnet”, here’s a copy of my weekly .NET newsletter, creatively titled “Last Week in .NET”. I’m posting it here in the vain hopes that you’ll sign up for the newsletter or subscribe to the podcast. ♥

📝 Not about .NET, but relevant to our interests: Pintrest Engineering talks about they decreased their build times by 99% by changing one line in their build process. If you use Git and you use Hosted CI, you’re going to want to pay attention to this. Hell, even if you don’t use Hosted CI, taking a look at what tricks may speed up your build time is always a good idea. This post also re-inforces that good API naming is a must. If you’re a git expert, you probably know this trick, but for the rest of us, this stuff comes down to discoverability, and I’m not exaggerating when I say the git API is… opaque at best.

🎁 You can now tell the HttpRepl where to find your OpenAPI files. If you use HttpRepl (Microsoft’s command line version of cURL or Postman) you can now tell it where to find your swagger or other OpenAPI files. This is one of those “I really need to check out HttpRepl” moments. One of the problems with cURL and Postman have been the… well.. generic nature of the tool. Having a tool that is aware of the modern web application stack is helpful. Special thanks to Brady Gaster on Twitter (@bradygaster) for making me aware of this.

🎥 Progress Telerik is hosting a “The State of .NET” Webinar. This is clearly a cash grab for your email address so that they have you on their sales list, but regardless, it should be informative. Since I already have your email address, you can always wait for the podcast episode to drop where I cover everything that Microsoft released during .NET Conf.

📅 .NET Conf is November 10th – November 12th. If you’re listening to the podcast version of this, that means it’s tomorrow. I’ll be live tweeting this from @gortok on twitter and I’ll have a special wrapup afterwards on the podcast… like I just said above.

📝 Scott Hanselman talks about Path.DirectorySeparatorChar gotchas in .NET Core when moving from Windows to Linux This is an informative blog post on what can happen when you hardcode special characters in your application, and it is something that just about every production .NET Framework Application has hiding in it… somewhere. Stay Frosty.

🐞 Not content to ruin everyone’s day with the String.IndexOf linguistic comparison problems in .NET Core we talked about last week, Jimmy Bogard found that a target framework moniker of NET50 and NET5.0 both work in Visual Studio. Both work due to Nuget parsing rules, and it’s going to be interesting to see if this causes a problem come .NET 10.

🎥 Progress Telerik also hosted a “Future of Desktop” webinar on .NET last week, and while I missed the announcement before it happened, the video is available to watch. If you write .NET Desktop applications, check it out.

📝 Are Records in C# 9 immutable by default? Dave Brock asks this question and deep dives into the answer in his blog post: Short answer is: it depends, and somewhere a software architect is basking in the glow of that answer.

🎁 TypeScript 4.1 RC1 is now available Because TypeScript doesn’t support Semver, there are nearly always breaking changes in minor releases, and this one is no different. If you use TypeScript, it’s healthy to be aware of these changes before they break your build because your package.json file wasn’t pinned to the patch version for TypeScript. This oddly specific failure brought to you by my own experiences trusting version numbers.

And lastly,

🎁 The EF Core folks aren’t sleeping at all if this release changelog is any indication. EF Core 5.0 RC2 is out; and the list of changes is too long to mention here. It’s entirely evident that someone said “Look, EF Core is coming on November 10th, so it’d better be ready”. If you know an EF Core team member, slide them a gift card and a socially distanced hug.

Did you like what you read? This is a weekly newsletter you can sign up for at https://www.lastweekin.net. If you’d prefer it in audio form (hi, we should be friends), you can subscribe to the podcast version at https://podcast.lastweekin.net.