Lev Yastrebov’s Blog

👋 Welcome to my blog! I’m a software engineer with decade+ experience, specializing in backend and algorithms, preferably using .NET. I love creating effective, robust, and maintainable software systems.

Let’s get to know each other:

Screenshot of code in ILSpy

.NET: How AOTed trimmed application can read data from another assembly

I will show you ways to read string data from arbitrary .NET assembly in case when you don’t have: Reflection, i.e when you operate from a trimmed or AOTed application Full set of app dependencies. This is conceptionally wrong - why do we need to load everything, when we only need raw data from a library, also, I wanted a way to read data from damaged distributions. Let’s imagine we have an assembly, where we have this code:...

October 12, 2024 · 5 min · Lev Yastrebov
Error diagram

Windows Application Packaging Project: Solving Cryptic Error When Referencing a .NET Project

I have a Windows desktop application that I distribute using MSIX packages, making them easily installable and automatically updated on modern Windows machines. To create such a package, the most straightforward method is to use the Windows Application Packaging (WAP) project, although it does have its quirks. Additionally, I have a utility project that doesn’t require access to Windows APIs but needs to support trimming and be as compact as possible....

September 19, 2024 · 5 min · Lev Yastrebov
RAG diagram

GenAI on your Data: What is RAG and Semantic Search and Why It's Hard for Code

Recently, I came across a one-year-old Youtube tutorial, that showed how to run ChatGPT on my own data in ~15 minutes. That sparked my interest, I thought - what if I fed ChatGPT with my codebase, so it could respond to queries like: Where in the code is the order total compared to what’s returned by the vendor? And it would show me code fragments with class names (I’m in C#)....

August 23, 2024 · 17 min · Lev Yastrebov
Screenshot of build failures and one successful run

Obscure error during switching of Azure SWA Functions from in-process to isolated mode

A couple of years ago I crafted an internal-use utility for one of my clients that uses Azure Static Web Apps with Blazor and some Functions. That worked well, but the client asked to extend functionality, so I decided to refresh the code along the way. Back in the day, I wrote the utility using .NET 6 and in-process functions, since the out-of-process mode was not yet available. The current ....

August 2, 2024 · 6 min · Lev Yastrebov
Notification about ApplicationInsights SDK deprecation on Microsoft site

Migration from .NET ApplicationInsights SDK to Azure OpenTelemetry Exporter

The AppInsights SDK is quite simple to integrate with and provides rather rich functionality and extensibility, but it is now considered a “legacy” - Azure team announced focus switch to support OpenTelemetry: So, we should switch to using Azure.Monitor.OpenTelemetry.Exporter. That’s not a bad thing by itself, but there are not many guides on the migration process, especially for console applications like mine, and the Azure Exporter doesn’t support a lot of useful things I got used to....

July 19, 2024 · 8 min · Lev Yastrebov