Skip to content

Conversation

CharliePoole
Copy link
Member

@CharliePoole CharliePoole commented Jul 31, 2025

Fixes #1744

This PR adds parameters to the ExtensionManager to control two aspects of it's behavior:

  1. The default Path used for extension points defined by the TypeExtensionAttribute. This was previously hard-coded as "/NUnit/Engine/TypeExtensions/" but is now set by ExtensionService and DriverService when creating the manager.

  2. The prefixes used for recognizing extensions stored in standard locations relative to the engine. This was previously hard-coded as well, using "NUnit.Extension." for nuget and "nunit-extension-" for chocolatey. It is now set by the callers creating the manager.

The intent of this change is to make it easier for extensions not using the standard package naming to be located and installed. It enables use of ExtensionManager by additional NUnit components, i.e. other than the engine itself and potentially by third parties.

ExtensionManager is a somewhat low-level API and for most usage will probably be wrapped by a higher-level interface, which takes responsibility for creating the manager and setting parameters correctly. That's precisely the relationship between our ExtensionService and ExtensionManager.

@CharliePoole CharliePoole requested a review from a team July 31, 2025 14:53
@CharliePoole CharliePoole merged commit 02a2c62 into main Aug 13, 2025
4 checks passed
@CharliePoole CharliePoole deleted the issue-1744 branch August 13, 2025 03:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Generalize NUnit.Extensibility for broader use

1 participant