skip to content
Relatively General .NET

Unlock new possibilities for AI Evaluations for .NET

by Wendy Breiding (SHE/HER)

posted on: March 03, 2025

Microsoft.Extensions.AI.Evaluations library is now open source, and a new Azure DevOps plug-in is available to make reporting in your CI pipelines easier than ever.

Listen to clipboard changes in a WPF application

by Gérald Barré

posted on: March 03, 2025

To improve the UX, it can be useful to listen to clipboard changes. For instance, you can fill a 2FA code in a text box when the user copies it to the clipboard.This can be done using the AddClipboardFormatListener function. Here is a simple example of how to listen to clipboard changes in a WPF ap

RavenDB 7.0 Released

by Oren Eini

posted on: March 03, 2025

The big-ticket item for RavenDB 7.0 may be the new vector search and AI integration, but those aren’t the only new features this new release brings to the table.AWS SQS ETL allows you to push data directly from RavenDB into an SQS queue. You can read the full details in our documentation, but the basic idea is that you can supply your own logic that would push data from RavenDB documents to SQS for additional processing.For example, suppose you need to send an email to the customer when an order is marked as shipped. You write the code to actually send the email as an AWS Lambda function, like so:def lambda_handler(event, context): for record in event['Records']: message_body = json.loads(record['body']) email_body = """ Subject: Your Order Has Shipped! Dear {customer_name}, Great news! Your order #{order_id} has shipped. Here are the details: Track your package here: {tracking_url} """.format( customer_name=message_body.get('customer_name'), order_id=message_body.get('order_id'), tracking_url=message_body.get('tracking_url') ) send_email( message_body.get('customer_email'), email_body ) sqs_client.delete_message( QueueUrl=shippedOrdersQueue, ReceiptHandle=record['receiptHandle'] )You wire that to the right SQS queue using:aws lambda create-event-source-mapping \ --function-name ProcessShippedOrders \ --event-source-arn arn:aws:sqs:$reg:$acc:ShippedOrders \ --batch-size 10The next step is to get the data into the queue. This is where the new AWS SQS ETL inside of RavenDB comes into play. You can specify a script that reacts to changes inside your database and sends a message to SQS as a result. Look at the following, on the Orders collection:if(this.Status !== 'Completed') return; const customer = load(this.Customer); loadToShippedOrders({ 'customer_email': customer.Email, 'customer_name': customer.Name, 'order_id': id(this), 'tracking_url': this.Shipping.TrackingUrl });And you are… done! We have a full blown article with all the steps walking you through configuring both RavenDB and AWS that I encourage you to read.Like our previous ETL processes for queues, you can also use RavenDB in the Outbox pattern to gain transactional capabilities on top of the SQS queue. You write the messages you want to reach SQS as part of your normal RavenDB transaction, and the RavenDB SQS ETL will ensure that they reach the queue if the transaction was successfully committed.

RavenDB 7.0 Released

by Oren Eini

posted on: February 27, 2025

RavenDB 7.0 is out, and the big news is vector search and AI integration in the box. You can download the new bits, run it in the cloud, or just look at the public instance to test it out.Before discussing the actual feature, I want to show you what we have done:$query = 'I feel like italian today' from Products where vector.search(embedding.text(Name), $query)Try that in the public instance using the sample database, here is what you get back!I wrote parts of the vector search for RavenDB, and even so, Iwas pretty amazed when I realized that this query above just works. Note that there is no actual setup to be done here. You just issue a query and ask it to use the vector.search() during execution. RavenDB handles everything else.You can read more about the vector search feature in our documentation, but the gist of it is that you can run a piece of data (text, image, or even a video) through a large language model and get a vector back. That vector allows you to query using the model’s understanding of the data. The idea is that this moves you beyond querying with keywords or even full-text search. You are now able to search for meaning and intent. You can leverage models such as OpenAI, Ollama, Grok, Mistral, or DeepSeek to give your users deep insight into their data inside RavenDB.RavenDB embeds a small model (bge-micro-v2) and can apply it during auto-indexes, both for generating embeddings for your data and for queries. As you can see, even with a tiny model, the results are spectacular. Naturally, you can also use larger models, including OpenAI, Ollama, Grok, and more. Using a large model means it has a better contextual understanding of the relationships between the data and the query and can provide more accurate results. RavenDB’s support for vector search includes:Approximate neighbor search using the HNSW algorithm.Exact neighbor search.Support for vectors using float arrays, base64 encoded, and binary attachments.RavenVector type for optimizing disk space and improving the read speed of vectors.Using full vectors or providing quantized ones to reduce disk space.Support for auto-quantization of vectors during indexing & queries.Our aim with the new RavenDB 7.0 release is to make it possible for you to find meaning - to be able to leverage vectors, embeddings, large language models, and AI without fuss or trouble. I’m really proud to say that we have exceeded all my expectations.There are a lot more exciting announcements about RavenDB & AI integration in the pipeline, and I’m really excited to share them with you in the near future.There are actually other features that are part of RavenDB 7.0, but AI is eating the world, so we’ll cover them in a separate blog post instead of giving them a tertiary spot in this one.

2024 Year In Review

by Ardalis

posted on: February 26, 2025

Better late than never, as I'm writing this in late February 2025... First, here's a few links to past years in review: My 2017 Year in…Keep Reading →

.NET 10 Preview 1 is now available!

by .NET Team

posted on: February 25, 2025

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

.NET Aspire 9.1 is here with six great new dashboard features, and more!

by Maddy Montaquila

posted on: February 25, 2025

.NET Aspire 9.1 is here! From enhanced dashboard capabilities like Resource Relationships and Localization Overrides to improved Docker integration and flexible console logs, this release is packed with tools to streamline your development process.

How does the compiler infer the type of default?

by Gérald Barré

posted on: February 24, 2025

The default keyword is a powerful tool in C#. For reference types, it returns null, and for value types (structs), it returns a zeroed-out value. Interestingly, default(T) and new T() can yield different results for structs (check out Get the default value of a type at runtime for more info). Initi