Posts

Showing posts from July, 2026

Nugget 18: Unit Test a Semantic Kernel Function - Would the LLM Call it?

Image
During the past few months I have been working, at Dev-Nugget-Labs , on a AI-First application, WORKS Commons, WC. WC uses LLMs in deterministic workflows as a source of signals. The intelligence and decision making reside in the system, not in the models. But this Nugget is not about WC, nor about its deterministic workflows, or what they accomplish. This Nugget is about how to Unit Test a Semantic Kernel function. Why? Four questions: Will it cover the happy path. Would the Edge Cases be handled. Would the Plugin register with the Kernel correctly. Would the Plugin be called. The Plugin This is the Semantic Kernel Function the LLM will call based on instructions. The Unit Tests will mimic how LLMs will call the function. Note that the plugin follows the architecture Microsoft recommends for Semantic Kernel: No business logic lives in the plugin. This is what is supposed to happen: LLM → Kernel → Plugin → Service → Repository This separation ensures reusability: whether exposed via RE...

Nugget 17: Override a Global EF Tool Locally with an Earlier Version

Image
Problem You need to create an Entity Framework migration for a project that targets an earlier version of .NET. After updating your models, you run: dotnet dotnet-ef migrations add UpdateStudent The command throws an exception: Build started... Build succeeded. Unhandled exception. System.IO.FileLoadException: Could not load file or assembly 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a'. The located assembly's manifest definition does not match the assembly reference. (0x80131040) File name: 'System.Runtime, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' The issue is that the globally installed dotnet-ef command-line tool is version 8.x or 9.x. When you execute dotnet ef migrations add , the global tool runs within your project's context. Because the tool itself requires .NET 8, it attempts to load assemblies that do not exist in a .NET 5 application and fails with a runtime exception. Your project is...