Changelog
All notable changes to this project are documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Changed
Section titled “Changed”- The license is now Apache-2.0, previously MIT.
1.2.1 - 2026-07-30
Section titled “1.2.1 - 2026-07-30”RegisterandUnregister(ExportComponent)now raiseExportCollectionChanged. The event condition was inverted: a component registered through the public API never raised the event, while the internal export restore inUnloadAssemblyraised it twice.Unregister(Uri)is unchanged.ExportComponent.Instanceis thread safe. Two threads readingInstanceat the same time could each create an own instance; now the first access creates the shared instance and later accesses return it.UnloadAssemblydrops the bookkeeping of exports it restored. WithExportDuplicateUriHandling.RemoveExisting, a second load and unload of the same assembly restored the exports recorded during the first load, and the records were kept for the lifetime of the process together with the components they referenced.- A manually created export validates its types.
ExportComponentDefinitionrejects a value type that is not assignable to the contract type, andExportComponent<T>rejects a contract type other thanT. Both cases used to pass and then fail withInvalidCastExceptioninsideGetExports.
Changed
Section titled “Changed”ContractDefinition.ContactNameandContractDefinition.ContactTypeare renamed toContractNameandContractType. The old properties remain as hidden[Obsolete]forwarders.TryCreateManyExportInstancesis renamed toCreateManyExportInstances(both overloads); the method never had try semantics. The old methods remain as hidden[Obsolete]forwarders.UnregisterCorestays public but is hidden from IntelliSense.Unregister(ExportComponent)is the member to call; it now also raisesExportCollectionChanged.AssemblyExportSettingsAttributeshows up in IntelliSense. The attribute configuresExportDuplicateUriHandling, so hiding it kept the only way to set the mode out of sight.RegisterthrowsInvalidOperationExceptioninstead ofExceptionwhen an export with the same URI is already registered, andArgumentExceptioninstead ofArgumentNullExceptionwhen the component location isnull.PrepareCacheremoves stale cache files of the same assembly after writing a new one. The old behavior kept a file for every past build, so the cache directory grew without limit.- The package targets
netstandard2.0only. Thenet5.0target carried the same code, the same public API and the same dependency, so a project on .NET 5 or later now resolves thenetstandard2.0assets instead.
- Test project
TagBites.ComponentModel.Composition.Tests(xUnit), run by thebuild & testworkflow and before every publish. - Documentation comments on the public members of
ExportComponentManager.
1.2.0 - 2025-11-28
Section titled “1.2.0 - 2025-11-28”Changed
Section titled “Changed”- The cache file name includes the assembly module version id instead of file size and write time. The cache now invalidates exactly when the assembly content changes, independent of file metadata.
- The export map is a plain dictionary keyed by contract type and contract name, which simplifies lookup and registration paths.
1.1.0 - 2025-07-04
Section titled “1.1.0 - 2025-07-04”- Export override with the same URI. The
AssemblyExportSettingsassembly attribute selects the behavior for duplicate URIs viaExportDuplicateUriHandling:SkipCurrent(default, the new export is ignored),OverrideExisting(the new export wins URI lookups) orRemoveExisting(the existing export is removed and restored when the new assembly unloads).
1.0.2 - 2023-12-07
Section titled “1.0.2 - 2023-12-07”- A failed
LoadAssemblycall no longer leaves the manager in an inconsistent state. When an assembly cannot be processed completely, the manager unloads it and rethrows, so either all exports of the assembly are available or none.
1.0.1 - 2021-07-29
Section titled “1.0.1 - 2021-07-29”First stable release. Export container with lookup by contract type, contract name and URI; manual component registration with an instance provider for types without a default constructor; change notifications per contract type; assembly scan cache with caller-provided serialization.