skip to content
Relatively General .NET

Remove empty folders using PowerShell

by Gérald Barré

posted on: April 21, 2025

Here's a PowerShell script that removes empty folders recursively:PowerShellcopy$rootFolder = 'C:\Temp' Get-ChildItem $rootFolder -Recurse -Directory -Force | Sort-Object -Property FullName -Descending | Where-Object { $($_ | Get-ChildItem -Force | Select-Object -First 1).Count -eq 0 } |

Preview 2 of the .NET AI Template Now Available

by Jordan Matthiesen

posted on: April 17, 2025

Preview 2 of the .NET AI Chat Web App template introduces support for .NET Aspire and Qdrant vector database integration, making it easier to create cloud-native AI-powered chat applications with custom data.

Build MCP Remote Servers with Azure Functions

by Matt Soucoup

posted on: April 16, 2025

Build AI-powered tools quickly using Azure Functions to create remote MCP servers that seamlessly integrate with GitHub Copilot and other LLM-based applications.

Join the .NET & C# Teams at Microsoft Build 2025

by .NET Team

posted on: April 15, 2025

The countdown to Microsoft Build 2025 is on! Join us May 19-22 either in-person in Seattle or online and explore an exciting lineup of .NET and C# content, including sessions on AI integration, app modernization, and the latest language features.

Who can cancel Carmen Sandiego?

by Oren Eini

posted on: April 14, 2025

RavenDB is a pretty big system, with well over 1 million lines of code. Recently, I had to deal with an interesting problem. I had a CancellationToken at hand, which I expected to remain valid for the duration of the full operation.However, something sneaky was going on there. Something was cancelling my CancelationToken, and not in an expected manner. At last count, I had roughly 2 bazillion CancelationTokens in the RavenDB codebase. Per request, per database, global to the server process, time-based, operation-based, etc., etc.Figuring out why the CancelationToken was canceled turned out to be a chore. Instead of reading through the code, I cheated.token.Register(() => { Console.WriteLine("Cancelled!" + Environment.StackTrace); });I ran the code, tracked back exactly who was calling cancel, and realized that I had mixed the request-based token with the database-level token. A single line fix in the end. Until I knew where it was, it was very challenging to figure it out.This approach, making the code tell you what is wrong, is an awesome way to cut down debugging time by a lot.

There is no self-closing tag in html

by Gérald Barré

posted on: April 14, 2025

There is no self-closing tag in html! This statement seems wrong as you may have seen self-closing tags in html, such as <img src="foo.jpg" /> (with /> at the end). However, this is not a concept in html. Let me explain.While HTML looks similar to a permissive XML, it's not XML. As an exam

Pricing transparency in RavenDB Cloud

by Oren Eini

posted on: April 11, 2025

Cloud service costs can often be confusing and unpredictable.RavenDB Cloud's new feature addresses this by providing real-time cost predictions whenever you make changes to your system. This transparency allows you to make informed choices about your cluster and easily incorporate cost considerations into your decision loop to take control of your cloud budget.. The implementation of cost transparency and visibility features within RavenDB Cloud has an outsized impact on cost management and FinOps practices. It empowers you to make informed decisions, optimize spending, and achieve better financial control.The idea is to make it easier for you to spend your money wisely. I’m really happy with this feature. It may seem small, but it will make a difference. It also fits very well with our overall philosophy that we should take the burden of complexity off your shoulders and onto ours.

.NET 10 Preview 3 is now available!

by .NET Team

posted on: April 10, 2025

Find out about the new features in .NET 10 Preview 3 across the .NET runtime, SDK, libraries, ASP.NET Core, Blazor, C#, .NET MAUI, and more!