Skip to content

About

message broker implemented using .net9

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

9 Commits

Folders and files

Repository files navigation

🌱 Smart Plugin Integration Guide 🌱

Coding Cat


*"Good developers copy, great developers automate"*

🛠️ Automatic Plugin Setup 🛠️

1. Edit Consumer Project File

<!-- 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>

2. Solution Structure

Solution/
├── MessageBroker.Consumer.App/
│   └── 📄 ConsumerApp.csproj (modified)
└── MessageBroker.Plugins.MyCustomPlugin/
    └── 📄 MyCustomPlugin.cs

🌟 How It Works 🌟

  1. Automatic Discovery
    Finds all plugin projects matching MessageBroker.Plugins.* pattern

  2. Smart Copying
    Copies built DLLs to consumer's plugins directory on every build

  3. Clean Integration
    ReferenceOutputAssembly=false keeps your dependencies clean


🚀 Development Workflow 🚀

  1. Create new plugin project
dotnet new classlib -n MessageBroker.Plugins.MyPlugin
  1. Add to consumer's project file
<ProjectReference Include="..\MessageBroker.Plugins.MyPlugin\MessageBroker.Plugins.MyPlugin.csproj">
  <ReferenceOutputAssembly>false</ReferenceOutputAssembly>
</ProjectReference>
  1. Build and run - plugins auto-deploy!
dotnet build
dotnet run

Magic
No more manual copying!


💡 Maintenance Tips 💡

  • 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 💖

About

message broker implemented using .net9

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages