ANCM In-Process Start Failure

Or, alternatively, Failed to launch debug adapter.

Blazor error

These were the two errors I was getting while playing with Blazor. They turn out to have the same cause, although the errors are not particularly indicative of the issue.

First, to get to the heart of the matter, the problem was that the server portion of the Blazor application had a runtime error. Turns out I had forgotten to include the reference to a class that was being injected into a server component. What slowed me down was that the messages were not overly precise about the source of the problem. 

But what might be more instructive is different ways the problem might be discovered. For my project, the server portion of the application was loaded into IIS Express. This was one of the reasons why I couldn't immediately see the problem. When the project is launched using the server application directly, a console window opens. In this window would be logging information, including, in this case, the runtime error saying that the server could not be started.

Armed with that information, I added logging to the server code. Now the actual problem was surfaced. I forgot to define the concrete object for one of my injected interfaces. My bad. And easy to fix, once you figure out the real problem.