How to Fix "Could Not Find a WAM Account" in Visual Studio 2022
There are not many things that are more annoying to start your day than this message in Visual Studio 2022:

There are not many things that are more annoying to start your day than this message in Visual Studio 2022:

I run into this annoying problem after the upgrade of IdentityServer to .Net 8. The IDP application works fine, but as soon as I tried to log in on a client, I got this error:
SqlException: Incorrect syntax near '$'.
With 2300 attendees this year's NDC Oslo was a bit smaller than the one in 2023. Nevertheless, I liked it much more and think the talks were a lot better.
Only two talks I attended finished after just 40 minutes and both times I could go to another talk and still catch some helpful insights. I had only 3 talks that did not meet my expectations, the rest were good to great talks that offered a lot of helpful insights.
For once we did not have much luck with the weather at the traditional Oslo Fjord Cruise. It started with clouds and turned into a thunderstorm. Fortunately, the boat is built in such a way that you do not notice much of these conditions if you stay inside.
I was looking forward to the workshop Designing APIs with Irina Scurtu, but that one got cancelled. Thus, I took the opportunity to finally spend some time with performance optimisation and load testing. The workshop with Mark Rendle was an excellent substitute where I learned a lot.
While this blog series on automation comes to an end, the opportunities to generate code continues. Here are some ideas for you on how to continue this journey on your own.
If we build code generators for a standardised solution, we will sooner or later need something special that does not fit into the generator. When that happens, we do not need to forfeit the benefits of our automation approach. Instead, we can build on top with hand-written code. Let us explore how we can do this safely.
In last week's post we generated repositories to access our tables. But do they work, or did we overlook something? Let us find out if everything works as expected by generating integration tests for our repositories.
Last week we reached our first milestone by accessing the database with our T4 template and create classes that match our tables (entities). We can now build on top of that knowledge and generate repositories to work with the data in our database.
With the T4.FileManager we got the missing part to create a code generator based on T4 templates that puts classes into their own files. With that problem solved, we can start our automation project and generate classes for all our database tables, generate the repositories to access the data and finish with integration tests to make sure that our repositories work as expected. Let us start with the entity generator.
When we generate code with T4, we end up with one single output file per template. That works if we only generate one HTML page or a single class. But when we want to generate multiple classes, the single output file is annoying. We never would let the developers write code that way; therefore, we should not let the automation get away with it either. Let us look at a solution to that problem.