You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Features in upgrade guide
* Installers too
* Non-upgrade-guide docs for features and installers
* IWantToRunBeforeConfigurationIsFinalized
* Fix link
* Update nservicebus/upgrades/9to10/index.md
---------
Co-authored-by: Daniel Marbach <daniel.marbach@openplace.net>
Copy file name to clipboardExpand all lines: nservicebus/lifecycle/iwanttorunbeforeconfigurationisfinalized.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,6 +7,9 @@ related:
7
7
- samples/startup-shutdown-sequence
8
8
---
9
9
10
+
> [!CAUTION]
11
+
> `IWantToRunBeforeConfigurationIsFinalized` is deprecated starting in NServiceBus version 10. Refer to the [NServiceBus 10 upgrade guide](/nservicebus/upgrades/9to10/#deprecated-iwanttorunbeforeconfigurationisfinalized).
12
+
10
13
During endpoint creation the configuration object used to construct the endpoint becomes frozen and locked. Classes that implement `IWantToRunBeforeConfigurationIsFinalized` are instantiated and called just before this happens. Use `IWantToRunBeforeConfigurationIsFinalized` for any last minute alterations to the configuration that may rely on other configuration settings.
Assemblies in the runtime directory are scanned for installers so no code is needed to register them.
2
+
3
+
> [!WARNING]
4
+
> In a future version of NServiceBus, [installers will not be scanned and must be registered manually](/nservicebus/upgrades/9to10/#extensibility-installers).
Copy file name to clipboardExpand all lines: nservicebus/pipeline/features.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -96,7 +96,7 @@ For a feature to be activated it needs to satisfy the following criteria:
96
96
snippet: FeatureSetup
97
97
98
98
> [!NOTE]
99
-
> Features are automatically detected and registered by NServiceBus when the assembly is scanned.
99
+
> In NServiceBus version 10 and below, features are automatically detected and registered by NServiceBus when the assembly is scanned. In a future version of NServiceBus [features will not be automatically detected during assembly scanning](/nservicebus/upgrades/9to10/#extensibility-features).
Copy file name to clipboardExpand all lines: nservicebus/upgrades/9to10/index.md
+56-2Lines changed: 56 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,11 @@ Not having a finder configured for a given message will result in:
60
60
-**When the message is allowed to start the saga** - Compile time analyzer error [NSB0006](/nservicebus/sagas/analyzers.md#message-that-starts-the-saga-does-not-have-a-message-mapping)
61
61
-**When the message is not allowed to start the saga** - `Exception` when processing the message: `Message type CompletePaymentTransaction is handled by saga OrderSaga, but the saga does not contain a property mapping or custom saga finder to map the message to saga data. Consider adding a mapping in the saga's ConfigureHowToFindSaga method`
The extension point [`IWantToRunBeforeConfigurationIsFinalized`](/nservicebus/lifecycle/iwanttorunbeforeconfigurationisfinalized.md) is deprecated with a warning in NServiceBus version 10 and will be removed in NServiceBus version 11.
66
+
67
+
Final adjustments to settings before configuration is finalized should be applied via an explicit last configuration step on the endpoint configuration, instead of via implementations of this interface discovered by scanning.
63
68
64
69
## Extensibility
65
70
@@ -69,6 +74,55 @@ This section describes changes to advanced extensibility APIs.
69
74
70
75
As part of adding nullability annotations, the `ContextBag` class no longer allows storing `null` as a value. This also applies to all types derived from `ContextBag`, including all behavior context classes and `TransportTransaction`.
71
76
77
+
### Features
78
+
79
+
In a future version of NServiceBus, [`Feature` classes](/nservicebus/pipeline/features.md) will not be automatically discovered by runtime assembly scanning. Instead, each feature should be explicitly enabled for an endpoint.
80
+
81
+
The preferred method of distributing a feature is to create an extension method on `EndpointConfiguration`, and enable the feature within that extension method:
The `EnableByDefault()` method is only used to signal that a Feature identified through assembly scanning should turn itself on by default, so this method is deprecated with a warning in NServiceBus version 10 to give advance notice of this change, and will be removed in version 11.
94
+
95
+
In addition, APIs that work with features using a `Type` have been deprecated, and instead the generic-typed variants should be used. For example:
Lastly, any `Feature` classes must now have a paramaterless constructor.
107
+
108
+
### Installers
109
+
110
+
Like features, [installer classes](/nservicebus/operations/installers.md) which implement `INeedToInstallSomething` will not be automatically discovered by runtime assembly scanning in a future version of NServiceBus.
111
+
112
+
Instead, installers should be explicitly registered either from an `EndpointConfiguration` or inside a feature's `Setup` method:
0 commit comments