skip to content
Relatively General .NET

Introducing .NET Smart Components – AI-powered UI controls

by Daniel Roth

posted on: March 20, 2024

Introducing .NET Smart Components, a set of genuinely useful AI-powered UI components that you can quickly and easily add to .NET apps.

Generate OpenAPI specification at build time from the code in ASP.NET Core

by Gérald Barré

posted on: March 18, 2024

The OpenAPI specification is a powerful tool to describe and document APIs. It is a standard that allows you to define the structure of your API, including the endpoints, the request and response models, and the security requirements. The OpenAPI specification is a JSON or YAML file that can be use

Generate Local .NET Secrets from Azure Deployments

by Frank Boucher

posted on: March 14, 2024

This post shows how to automatically generate .NET secrets that a .NET app can use from the Azure deployment.

Get started with .NET 8 and AI using new quickstart tutorials

by Jordan Matthiesen

posted on: March 13, 2024

New quickstarts are now available to help you get started with .NET and AI development.

Unity extension for Visual Studio Code – Now Generally Available

by Jb Evain

posted on: March 12, 2024

We are thrilled to announce the general availability of the Unity extension for Visual Studio Code. This extension, built upon the C# Dev Kit and C# extensions, gives you a comprehensive toolkit for your Unity development in Visual Studio Code across Windows, macOS, and Linux.

.NET March 2024 Updates – .NET 8.0.3, 7.0.17, .NET 6.0.28

by Rahul Bhandari (MSFT)

posted on: March 12, 2024

Check out latest March 2024 updates for .NET 8.0, .NET 7.0, and .NET 6.0.

Behind the implementation of .NET's PriorityQueue

by Andrew Lock

posted on: March 12, 2024

In this post I show how .NET's PriorityQueue implements its methods and relate these methods to operations on a min-heap data structure…

Understanding System.Diagnostics DiagnosticSource and DiagnosticListener (Part 1)

by Steve Gordon

posted on: March 11, 2024

Throughout its history, .NET has evolved various mechanisms to “log” diagnostic information inside applications and libraries, including TraceSource, EventSource, ILogger, and DiagnosticSource, the subject of this post. TraceSource is a legacy option and is rarely used in new code. ILogger is a simple structured logging abstraction that is well suited to many applications, although it […]

Set a blank page for new tabs in Microsoft Edge

by Gérald Barré

posted on: March 11, 2024

Microsoft Edge can be configured using the setting pages edge://settings. However, some settings are not available in the UI. For instance, you cannot replace the new tab page. You can only configure the content of the page… So, you have to stick with the Edge-like page with news and other stuff yo

Using analyzers in RavenDB indexing

by Oren Eini

posted on: March 08, 2024

We got an interesting question in the RavenDB Discussion:We have Polo (shirts) products. Some customers search for Polo and others search for Polos. The term Polos exists in only a few of the descriptions and marketing info so the results are different.Is there a way to automatically generate singular and plural forms of a term or would I have to explicitly add those?What is actually requested here is to perform a process known as stemming. Turning a word into its root. That is a core concept in full-text search, and RavenDB allows you to make use of that. The idea is that during indexing and queries, RavenDB will transform the search terms into a common stem and search on that. Let’s look at how this works, shall we?The first step is to make an index named Products/Search with the following definition:from p in docs.Products select new { p.Name }That is about as simple an index as you can get, but we still need to configure the indexing of the Name field on the index, like so:You can see that I customized the Name field and marked it for full-text search using the SnowballAnalyzer, which is responsible for properly stemming the terms. However, if you try to create this index, you’ll get an error. By default, RavenDB doesn’t include the SnowballAnalyzer, but that isn’t going to stop us. This is because RavenDB allows users to define custom analyzers.In the database “Settings”, go to “Custom Analyzers”:And there you can  add a new analyzer. You can find the code for the analyzer in question in this Gist link.You can also register analyzers by compiling them and placing the resulting DLLs in the RavenDB binaries directory. I find that having it as a single source file that we push to RavenDB in this manner is far cleaner.Registering the analyzer via source means that you don’t need to worry about versioning, deploying to all the nodes in the cluster, or any such issues. It’s the responsibility of RavenDB to take care of this.I produced the analyzer file by simply concatenating the relevant classes into a single file, basically creating a consolidated version containing everything required. That is usually done for C or C++ projects, but it is very useful in this case as well. Note that the analyzer in question must have a parameterless constructor. In this case, I just selected an English stemmer as the default one.With the analyzer properly registered, we can create the index and start querying on it.As you can see, we are able to find both plural and singular forms of the term we are searching for.To make things even more interesting, this functionality is available with both Lucene and Corax indexes, as Corax is capable of consuming Lucene Analyzers. The idea behind full-text search in RavenDB is that you have a full-blown indexing engine at your fingertips, but none of the complexity involved. At the same time, you can utilize advanced features without needing to move to another solution, everything is in a single box.