Plugins in .NET: Creating the plugin host

submited by
Style Pass
2023-03-24 12:30:05

One of the gripes I had with using Plex as a music player, was that it by default, matched my music collection with existing releases on MusicBrainz and used their metadata instead of mine. I’ve spent countless hours curating and tagging my music collection just the way I want it so it was quite annoying to see how it had been butchered by MusicBrainz’s metadata. Tags had been ruined and a few releases were incorrectly matched. I’m all for sane defaults that work for the majority of people, but I would’ve appreciated a heads-up before matching my library with MusicBrainz.

I believe that users should be able to explicitly opt-in to using their third-party integration of choice for both privacy and usability reasons. That is why I’m creating a plugin system for Coral, which ensures that users are able to pick exactly what integrations they want to run - or even make their own should they wish to.

Microsoft’s documentation on how to create a plugin system will only take you so far, once you start introducing custom service providers and dynamic loading of ASP.NET Core controllers, you’re on your own. This is going to be quite a long article with a lot of code, so get comfy.

Leave a Comment