.NET Annotated Monthly | March 2023
Did you know? There is a difference between the terms “argument” and “parameter”, despite everyone using them interchangeably. As is explained in this Stack Overflow question: “A parameter is a variable in a method definition. When a method is called, the arguments are the data you pass into the method’s parameters.” Now you know what you can have an argument about with fellow developers!
- Amplifying F# Project: Making a difference for the F# ecosystem
- Codespaces support for JetBrains Rider (Beta)
- Announcing .NET 8 Preview 1
- ASP.NET Core updates in .NET 8 Preview 1
- EF Core 8 Preview 1: Raw, lazy, and on-time
- Update to the .NET language strategy
- Introducing .NET Annotations Lambda Framework (Preview)
We’d like to thank Stefan Pölz for curating this month’s featured content! He is an international speaker, JetBrains Community Contributor (.NET), Microsoft MVP (Developer Technologies) and co-organizer of DotNetDevs.at meetups. Stefan tweets as 0x_F0, open sources on GitHub, and codes live on Twitch and YouTube.
Thank you JetBrains for granting me the opportunity to share my current passion: the .NET Compiler Platform. Well, passion is perhaps a bit of an understatement. For me it’s more of a hammer. And I try to make every problem I have look like a nail. Over the last two years I’ve talked a lot about Roslyn in general and Generators in particular, for example at the JetBrains .NET Days Online 2022.
Why am I so excited about Roslyn? Published as NuGet packages, the SDK exposes the Compiler APIs for both C# and Visual Basic. With these at our fingertips, we can write custom extension components, such as Diagnostic Analyzers (report warnings, errors, etc.) and Code Fixers (
Alt+Enter code actions), by inspecting the syntax trees and semantic symbols. Additionally, there are the Workspace APIs (handle solutions, projects and documents) that I’m about to explore in my live stream in order to build a standalone .NET tool that facilitates common coding tasks. The Roslyn programming model does take some practice to get used to, but if it has taught me one thing, it’s to use the terms ”parameter” and ”argument” correctly 😉. This deeper understanding of the language carries over to my day job development, where I now more consciously use the latest syntactic sugar and compiler magic.
Certainly not everyone needs to become a compiler engineer. However I still want to encourage you to take a brief peek behind the scenes from time to time. I’m sure it will pay off for you too, one way or another. If you would like to know more about Roslyn, I leave you with some resources and tools to kick-start your journey:
- Josh Varty gives a brilliant overview of the Roslyn APIs in the Learn Roslyn Now series
- SharpLab, by Andrey Shchekin, lets you view the syntax tree of any C# code you enter. Select ’Syntax Tree’ from the ’Results’ combo box.
- Conversely, Kirill Osenkov’s RoslynQuoter generates the Roslyn code required to build the syntax tree of the target C# code that you enter
- Microsoft.CodeAnalysis.Testing are NuGet packages that help in writing tests for your Roslyn components
- To browse the source code of Roslyn, go to sourceroslyn.io
- Awesome Roslyn is a curated list of books, tutorials, articles, and open source projects
- And, of course, the official documentation of the Roslyn SDK
May Roslyn be with you.
Programing tutorials and tips
.NET tutorials and tips
- Debugging Dapr applications with Rider or Visual Studio: A better way and Refactoring huge C# code base in minutes – Laurent Kempé breaks down how to debug Dapr apps with IDEs and shows some tricks for using both. Additionally, check out the great piece on refactoring those big ugly blocks of code.
- The circuit breaker pattern for a more resilient app – In this video, Layla Porter demonstrates how to use the circuit breaker pattern for your microservices. Give them more resiliency with this pattern.
- AvatarView in .NET MAUI Community Toolkit and Drawing with .NET MAUI Community Toolkit – Leomaris Reyes continues to publish excellent posts on MAUI. This time, we learned about the AvatarView (gotta have those avatars for your customers) and how to draw in MAUI.
- How to deploy your first .NET app on AWS with AppRunner – As it says, this tutorial by Daniel Lawson shows how to deploy .NET to AWS using AppRunner.
- Navigate Smarter with the New WPF OfficeNavigationBar – Maria Hadzhieva details the `OfficeNavigationBar` control and how you can use it to provide classic navigation in your apps.
- How to Create a Quick and Easy E-Shop with Reporting and ASP.NET Core or jQuery – Neli Kondova shows all the components necessary of building an entire online shop in ASP.NET Core using controls from Telerik.
- Building Functional .NET Applications: a Guide for Choosing between F# vs C# – Nahla Davies compares and contrasts various programming paradigms as well as some specific features of functional programming in F# and C#.
- ASP.NET Community Standup – Blazor United in .NET 8 – You may have noticed last month when we published a link to Steve Sanders’ Blazor United concept video. Now you can tune in to hear the ASP.NET team discuss it.
- What is .NET, and why should you choose it? – This post is from the .NET team. Check it out, then continue with the even more exciting and informative post below, by Andrew Lock.
- Thoughts on ‘What is .NET, and why should you choose it?’ – Here it is! Andrew Lock provides some commentary that’s really worth reading about the .NET Team’s post on why you should use .NET.
- What’s enough Complexity for a Domain Model? – Derek Comartin is tackling THE question. “How much complexity”. This is a tough one, but Derek is great at explainers and really goes into what you need to know to help you gauge the level of complexity for your own software.
- Troubleshooting JwtBearer authentication problems in ASP.NET Core and IdentityServer – IdentityResource vs. ApiResource vs. ApiScope – Tore Nestenius has published these excellent articles all about security and authentication in ASP.NET. Check them out, and make your software more robust and secure.
- Reading .NET performance counters without the PerfCounter API – Kevin Gosse demos how to read perf counters like the title says, but more so, there’s a lot of good info in here about ensuring you’re reading the correct counters for the situation and other “behind the scenes” info about how .NET works, and how that relates to performance.
- Upcoming Webinar: Coding a Cookbook with .NET MAUI – Tune in for Chad Church and Khalid Abuhakmeh as they hold a live webinar about MAUI. You might want to have a snack first though.
- The Blazor NavigationManager – This is a good resource for Blazor folks. Bookmark it for when you need a refresher on the `NavigationManager`. Post by Kristoffer Strube.
- WPF Begins its Long Goodbye – The desktop development landscape in .NET is a bit fractured, and Matthew MacDonald captures the sentiment nicely as well as how to cope with it going forward.
- Resiliency with Wolverine and Producer/Consumer Pattern with Wolverine – Jeremy Miller is doing a series on Wolverine (a toolset for command execution and message handling within . NET Core applications). Join in with resiliency and the producer/consumer patterns. Stay for more in the future.
- AOP with Interceptors and IL Code Weaving in .NET Applications – .NET folks aren’t usually into AOP, but it’s a technique worth having cursory knowledge about. AOP (Aspect Oriented Programming) gives a way to code one component for cross cutting but otherwise unrelated concerns in software – it’s done with code weaving. Engincan Veske shows how you might do this in .NET this post.
- Integrating MassTransit using AWS SNS/SQS into your ASP.NET project – A how-to on integrating MassTransit, a framework for messaging, into .NET apps. Post by Dennis Frühauff.
- Today’s Random F# Code: Type Inference – Urs Enzler answers some questions about type inference as well as explaining a few “gotchas” and things you might not know about how it works.
- Extracting Text from an Image with Amazon Textract and .NET – This is pretty cool. Amazon has APIs you can use with .NET Code for image processing. Bryan Hogan shows us how to get text from an image using these APIs.
- Play Audio and Video in .NET MAUI apps with the new MediaElement – Gerald Versluis demos A/V capabilities of MAUI apps.
- Creating and downloading zip files with ASP.NET Core – A classic but often programmed feature of web apps everywhere – the file download. Learn how to do it in ASP.NET core with this article by Thomas Ardal.
- Generating Bogus HTTP Endpoints with ASP.NET Core Minimal APIs – JetBrains advocate Khalid Abuhakmeh shows how to make bogus endpoints for testing.
Related programming tutorials and tips:
- 7 Resources Every Web Developer Should Know – There’s always some resource lacking for those who make complete small-medium sized websites, be it graphics, placeholder text, or some miniscule CSS issue. So Louëlla Creemers listed where to get those important resources for web devs.
- SQL Coding Series – Advanced – The SQL Coding Series from Women who Code continues. Tune in for Sneha Saxena
- Retrospectives Antipatterns – Does your team have the same argument time and again? Are there certain initiatives in which your team makes no progress and reverts to old ways? Aino Corry writes about how antipatterns can show up in all the wrong places, including the sprint or project retrospective, as well as what to do about them.
- How the GitHub Docs team uses GitHub Projects – The “How we do it at…” posts are often the best posts. In this case, Steve Guntrip writes about how GitHub rolls when they use their own product – GitHub Projects.
Here’s some great advice for developers from Bartosz:
And a very helpful programming tip from Jeremy:
Interesting and cool stuff
- Can artificial intelligence ever be sentient? – This is one of those deep questions of the modern age. The BBC asks that and other questions in this quick segment on AI.
Chrome knows everything.
And finally, the latest from JetBrains
Here’s a chance to catch up on JetBrains news that you might have missed:
Check out our .NET Guide! It’s a learning tool with tons of videos, tips, tricks, and info on a variety of .NET related topics.
News & releases
- RiderFlow 2023.1 Release Is Here
- Rider 2023.1 EAP 7 Comes With Support for Unity DOTS, a VCS Widget for Perforce, and More
- Rider 2023.1 EAP 6: New UI Improvements and a Better Debugging Experience
- ReSharper 2023.1 EAP 5 Is Out Now!
- Rider 2023.1 EAP 4 Is Here!
- ReSharper 2023.1 EAP 3 Is Here!
- ReSharper Ending Development for Visual Studio 2010 and 2012
- Introducing the Rider Localization EAP for Chinese, Japanese, and Korean
Webinars & recordings
- 3 Webinars on Game Development With Unity and Unreal Engine – Recordings Available
- .NET Systems Programming Learned the Hard Way – Webinar Recording
Tutorials & articles
- Optimizing Entity Framework Core Database Queries With Dynamic Program Analysis
- Raw Strings, UTF-8 Strings, and Multiline Interpolations – Using C# 11 in Rider and ReSharper
- Getting Started With dotTrace On macOS And Linux
- List and Span Pattern Matching – Using C# 11 in Rider and ReSharper
- Rider 2023.1 EAP 5: Schema Compare, Debugger Visualizers, Blueprint Error Parsing, and More
- Getting Started: Entity Framework Core 7 JSON Support
- Getting started with ML.NET
Don’t miss this fantastic offer! CODE Magazine is offering a free subscription to JetBrains customers. Get your copy today!
Sharing is caring! So share content that you find useful with other readers. Don’t keep it to yourself! Send us an email with your suggestions for publication in future newsletters!
Subscribe to Blog updates
Thanks, we've got you!