This document consolidates all naming conventions required for automatic plugin discovery and CI/CD packaging in CoseSignTool.
For a plugin to be automatically discovered and packaged, follow these conventions:
| Requirement | Convention | Example | Purpose |
|---|---|---|---|
| Project File | <Name>.Plugin.csproj |
MyCompany.CustomSigning.Plugin.csproj |
CI/CD auto-packaging |
| Assembly Name | <Name>.Plugin.dll |
MyCompany.CustomSigning.Plugin.dll |
Runtime discovery |
| Namespace | <Name>.Plugin |
MyCompany.CustomSigning.Plugin |
Code organization |
The GitHub Actions workflow automatically discovers plugins using:
PLUGIN_PROJECTS=($(find . -name "*.Plugin.csproj" -type f))CoseSignTool.MST.Plugin.csproj→ Microsoft's Signing Transparency (MST) pluginCoseSignTool.IndirectSignature.Plugin.csproj→ Indirect signature plugin
To add a new plugin that gets automatically built and packaged:
-
Create project with correct naming:
dotnet new classlib -n YourCompany.Feature.Plugin
-
Configure project file (
YourCompany.Feature.Plugin.csproj):<Project Sdk="Microsoft.NET.Sdk"> <PropertyGroup> <TargetFramework>net8.0</TargetFramework> <AssemblyName>YourCompany.Feature.Plugin</AssemblyName> </PropertyGroup> <ItemGroup> <ProjectReference Include="..\..\CoseSignTool.Abstractions\CoseSignTool.Abstractions.csproj" /> </ItemGroup> </Project>
-
That's it! No other changes needed:
- ✅ Automatically discovered by CI/CD
- ✅ Automatically built with versioning
- ✅ Automatically packaged in releases
- ✅ Automatically tested in CI pipeline
ProjectFile: AzureKeyVault.Integration.Plugin.csproj
AssemblyName: AzureKeyVault.Integration.Plugin.dll
Namespace: AzureKeyVault.Integration.Plugin
ProjectFile: SecureSign.Enterprise.Plugin.csproj
AssemblyName: SecureSign.Enterprise.Plugin.dll
Namespace: SecureSign.Enterprise.Plugin
ProjectFile: CloudHSM.Provider.Plugin.csproj
AssemblyName: CloudHSM.Provider.Plugin.dll
Namespace: CloudHSM.Provider.Plugin
❌ CustomSigningTool.csproj → Missing .Plugin suffix
❌ MyPlugin.csproj → Missing .Plugin suffix
❌ CoseSignTool.Utilities.csproj → Not a plugin (utilities)
❌ SigningHelper.csproj → Missing .Plugin suffix
YourCompany.Feature.Plugin/
├── YourCompany.Feature.Plugin.csproj # ← Must end with .Plugin.csproj
├── YourFeaturePlugin.cs # ← Main plugin class
├── Commands/
│ ├── SignCommand.cs
│ ├── VerifyCommand.cs
│ └── StatusCommand.cs
└── README.md
If you have existing plugins not following the convention:
# Before
MyCustomPlugin.csproj
# After
MyCustom.Plugin.csproj<PropertyGroup>
<AssemblyName>MyCustom.Plugin</AssemblyName>
</PropertyGroup>The plugin will be automatically discovered on the next build!
Following the .Plugin.csproj naming convention provides:
- ✅ Zero Maintenance: No manual CI/CD script updates
- ✅ Automatic Packaging: Included in all releases
- ✅ Automatic Discovery: Runtime plugin loading
- ✅ Automatic Testing: CI/CD test execution
- ✅ Future-Proof: Works with unlimited plugins
- ✅ Fail-Safe: Cannot forget to include in deployment
- ✅ Convention-Based: Clear, predictable rules
- Plugin Quick Start Guide - Step-by-step plugin creation
- Plugin API Reference - Complete interface documentation
- Plugin Build and Deploy Guide - Detailed build process
- Main Plugins Documentation - Comprehensive plugin system guide
🚀 Ready to create a plugin? Start with the Plugin Quick Start Guide using the correct naming conventions!