🌱 Smart Plugin Integration Guide 🌱
<!-- MessageBroker.Consumer.App.csproj -->
<ItemGroup>
<!-- Add plugin project references -->
<ProjectReference Include="..\MessageBroker.Plugins.MyCustomPlugin\MessageBroker.Plugins.MyCustomPlugin.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
<SkipGetTargetFrameworkProperties>true</SkipGetTargetFrameworkProperties>
</ProjectReference>
</ItemGroup>
<Target Name="CopyPlugins" AfterTargets="Build">
<PropertyGroup>
<PluginsDir>$(OutputPath)plugins</PluginsDir>
</PropertyGroup>
<ItemGroup>
<PluginBinaries Include="..\MessageBroker.Plugins.*\bin\$(Configuration)\net9.0\*.dll" />
</ItemGroup>
<MakeDir Directories="$(PluginsDir)" />
<Copy SourceFiles="@(PluginBinaries)"
DestinationFolder="$(PluginsDir)"
OverwriteReadOnlyFiles="true" />
</Target>Solution/
├── MessageBroker.Consumer.App/
│ └── 📄 ConsumerApp.csproj (modified)
└── MessageBroker.Plugins.MyCustomPlugin/
└── 📄 MyCustomPlugin.cs-
Automatic Discovery
Finds all plugin projects matchingMessageBroker.Plugins.*pattern -
Smart Copying
Copies built DLLs to consumer'spluginsdirectory on every build -
Clean Integration
ReferenceOutputAssembly=falsekeeps your dependencies clean
- Create new plugin project
dotnet new classlib -n MessageBroker.Plugins.MyPlugin- Add to consumer's project file
<ProjectReference Include="..\MessageBroker.Plugins.MyPlugin\MessageBroker.Plugins.MyPlugin.csproj">
<ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>- Build and run - plugins auto-deploy!
dotnet build
dotnet run- Add new plugins by simply including their project references
- All plugins rebuild automatically with solution builds
- Keep plugin directory clean with:
<Clean Include="$(PluginsDir)\**" />
- Supports both Debug and Release configurations
🎉 Happy Automated Developing!
Your future self will thank you for this setup 💖

