-
Notifications
You must be signed in to change notification settings - Fork 160
Description
NUnit Engine/API versions 3.19.1.
How should extensions be loaded now? With the latest nunit-console (3.19.1) and engines/api, our extensions are no longer loading.
From the source code, you can see a major change here where the code is only looking at specific folders that match hardcoded patterns:
public void FindExtensionAssemblies(Assembly hostAssembly)
{
log.Info($"FindExtensionAssemblies called for host {hostAssembly.FullName}");
bool isChocolateyPackage = System.IO.File.Exists(Path.Combine(hostAssembly.Location, "VERIFICATION.txt"));
string[] extensionPatterns = isChocolateyPackage
? new[] { "nunit-extension-*/**/tools/", "nunit-extension-*/**/tools/*/" }
: new[] { "NUnit.Extension.*/**/tools/", "NUnit.Extension.*/**/tools/*/" };
IDirectory startDir = _fileSystem.GetDirectory(AssemblyHelper.GetDirectoryName(hostAssembly));
while (startDir != null)
{
foreach (var pattern in extensionPatterns)
foreach (var dir in _directoryFinder.GetDirectories(startDir, pattern))
ProcessDirectory(dir, true);
startDir = startDir.Parent;
}
}
Does the documentation around loading extensions need to be updated, or is there a way to get engine to allow for other folders to contain extensions?