How to convert an existing Api to Aspire
For documentation on this see Add Aspire to Existing-App
How to extend the NUnit constraints
NUnit has a very rich and readable constraint set. Normally you don’t need to do anything. But, there are some cases where it would be nice to be able to tweak these constraints. You can always wrap them and extend them that way, but then you lose all the other good stuff, like chaining. What is not so well known is that you can extend the existing constraints, they are **designed** to be extendable! In this post I will show how you can do that easily.
Setting up Visual Studio Code
C# extension
Add the standard C# extension
Solution extension
Add the solution extension
This goes together with organizing your code with a parent folder, called solution root, and then having each C# project in a corresponding subfolder. Add these projects to your solution using the solution extension.
Debugger
The C# debugger comes with the standard C# extension
Set up the debugger as shown in this post
If debugger won’t start, and saying things like Omnisharp server not running, then run the command (from the command palette) Omniserver restart and then Generate assets for debug.
The Type-Safe-Boundary, what it is and how to use it to prevent bugs
Background
I’ve been writing code for some decades now. Over that time there is one thing I have learned through projects that have failed, projects that have been successes, legacy projects, greenfield projects, projects with dedicated experienced teams, projects with fresh new developers, distributed projects, closed source and open source, and all other kinds, being a consultant working with a multitude of companies and open source enthusiast, and that is - strongly typed code prevails.
The concept I am describing below is something I have been using for well over 20 years now, but never got around writing about. So, here it is!!