diff --git a/build.cake b/build.cake index b6681b8f7..a753542bc 100644 --- a/build.cake +++ b/build.cake @@ -1,5 +1,5 @@ // Load the recipe -#load nuget:?package=NUnit.Cake.Recipe&version=1.3.0 +#load nuget:?package=NUnit.Cake.Recipe&version=1.3.1-alpha.1 // Comment out above line and uncomment below for local tests of recipe changes //#load ../NUnit.Cake.Recipe/recipe/*.cake @@ -121,10 +121,15 @@ BuildSettings.Packages.AddRange(new PackageDefinition[] { HasFiles("LICENSE.txt", "NOTICES.txt", "CHANGES.txt"), HasDirectory("bin/net462").WithFiles("nunit3-console.exe", "nunit3-console.exe.config", "nunit3-console.pdb").AndFiles(ENGINE_FILES).AndFiles(ENGINE_PDB_FILES), - HasDirectory("bin/net462/addins").WithFiles( - "nunit.core.dll", "nunit.core.interfaces.dll", "nunit.engine.api.dll", - "nunit.v2.driver.dll", "nunit-project-loader.dll", "nunit-v2-result-writer.dll", - "teamcity-event-listener.dll", "vs-project-loader.dll"), + HasDirectory("NUnit.Extension.NUnitProjectLoader.3.8.0"), + HasDirectory("NUnit.Extension.NUnitV2Driver.3.9.0"), + HasDirectory("NUnit.Extension.NUnitV2ResultWriter.3.8.0"), + HasDirectory("NUnit.Extension.TeamCityEventListener.1.0.7"), + HasDirectory("NUnit.Extension.VSProjectLoader.3.9.0"), + //HasDirectory("bin/net462/addins").WithFiles( + // "nunit.core.dll", "nunit.core.interfaces.dll", "nunit.engine.api.dll", + // "nunit.v2.driver.dll", "nunit-project-loader.dll", "nunit-v2-result-writer.dll", + // "teamcity-event-listener.dll", "vs-project-loader.dll"), HasDirectory("bin/netcoreapp3.1").WithFiles(ENGINE_CORE_FILES).AndFiles(ENGINE_CORE_PDB_FILES), HasDirectory("bin/agents/net462").WithFiles(AGENT_FILES).AndFiles(AGENT_PDB_FILES), HasDirectory("bin/agents/net6.0").WithFiles(AGENT_FILES_NETCORE).AndFiles(AGENT_PDB_FILES_NETCORE), diff --git a/src/NUnitEngine/nunit.engine.core/Services/ExtensionManager.cs b/src/NUnitEngine/nunit.engine.core/Services/ExtensionManager.cs index a02d1b410..1780eb6ec 100644 --- a/src/NUnitEngine/nunit.engine.core/Services/ExtensionManager.cs +++ b/src/NUnitEngine/nunit.engine.core/Services/ExtensionManager.cs @@ -384,6 +384,7 @@ private void ProcessAddinsFile(IFile addinsFile, bool fromWildCard) string entryDir = entry.DirectoryName; string entryFile = entry.FileName; + log.Debug($"Processing entry {entry.Text}"); if (entry.IsDirectory) { if (entry.IsFullyQualified) @@ -412,9 +413,14 @@ private void ProcessAddinsFile(IFile addinsFile, bool fromWildCard) private void ProcessCandidateAssembly(string filePath, bool fromWildCard) { + log.Debug($"Processing candidate assembly {filePath}"); + // Did we already process this file? if (_assemblies.ByPath.ContainsKey(filePath)) + { + log.Debug(" Skipping assembly already processed"); return; + } try { @@ -423,10 +429,12 @@ private void ProcessCandidateAssembly(string filePath, bool fromWildCard) // We never add assemblies unless the host can load them if (!CanLoadTargetFramework(Assembly.GetEntryAssembly(), candidateAssembly)) + { + log.Debug(" Unable to load this assembly"); return; + } // Do we already have a copy of the same assembly at a different path? - //if (_assemblies.ByName.ContainsKey(assemblyName)) if (_assemblies.ByName.TryGetValue(assemblyName, out ExtensionAssembly existing)) { if (candidateAssembly.IsBetterVersionOf(existing)) @@ -435,6 +443,7 @@ private void ProcessCandidateAssembly(string filePath, bool fromWildCard) return; } + log.Debug(" Adding this assembly"); _assemblies.Add(candidateAssembly); } catch (BadImageFormatException e) diff --git a/src/NUnitEngine/nunit.engine/nunit.engine.addins b/src/NUnitEngine/nunit.engine/nunit.engine.addins index be4c6fa29..4ddd66c2e 100644 --- a/src/NUnitEngine/nunit.engine/nunit.engine.addins +++ b/src/NUnitEngine/nunit.engine/nunit.engine.addins @@ -1,5 +1 @@ -addins/nunit.v2.driver.dll -addins/nunit-v2-result-writer.dll -addins/nunit-project-loader.dll -addins/vs-project-loader.dll -addins/teamcity-event-listener.dll +../../../bundled-extensions/NUnit.Extension.*/tools/**/ \ No newline at end of file