Skip to content

Commit 0d2aea3

Browse files
authored
Merge pull request #1599 from nunit/issue-1598
Update to latest recipe; fix format of zip file
2 parents ed398bf + a2f391e commit 0d2aea3

File tree

3 files changed

+21
-11
lines changed

3 files changed

+21
-11
lines changed

build.cake

+10-5
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// Load the recipe
2-
#load nuget:?package=NUnit.Cake.Recipe&version=1.3.0
2+
#load nuget:?package=NUnit.Cake.Recipe&version=1.3.1-alpha.1
33
// Comment out above line and uncomment below for local tests of recipe changes
44
//#load ../NUnit.Cake.Recipe/recipe/*.cake
55

@@ -121,10 +121,15 @@ BuildSettings.Packages.AddRange(new PackageDefinition[] {
121121
HasFiles("LICENSE.txt", "NOTICES.txt", "CHANGES.txt"),
122122
HasDirectory("bin/net462").WithFiles("nunit3-console.exe", "nunit3-console.exe.config",
123123
"nunit3-console.pdb").AndFiles(ENGINE_FILES).AndFiles(ENGINE_PDB_FILES),
124-
HasDirectory("bin/net462/addins").WithFiles(
125-
"nunit.core.dll", "nunit.core.interfaces.dll", "nunit.engine.api.dll",
126-
"nunit.v2.driver.dll", "nunit-project-loader.dll", "nunit-v2-result-writer.dll",
127-
"teamcity-event-listener.dll", "vs-project-loader.dll"),
124+
HasDirectory("NUnit.Extension.NUnitProjectLoader.3.8.0"),
125+
HasDirectory("NUnit.Extension.NUnitV2Driver.3.9.0"),
126+
HasDirectory("NUnit.Extension.NUnitV2ResultWriter.3.8.0"),
127+
HasDirectory("NUnit.Extension.TeamCityEventListener.1.0.7"),
128+
HasDirectory("NUnit.Extension.VSProjectLoader.3.9.0"),
129+
//HasDirectory("bin/net462/addins").WithFiles(
130+
// "nunit.core.dll", "nunit.core.interfaces.dll", "nunit.engine.api.dll",
131+
// "nunit.v2.driver.dll", "nunit-project-loader.dll", "nunit-v2-result-writer.dll",
132+
// "teamcity-event-listener.dll", "vs-project-loader.dll"),
128133
HasDirectory("bin/netcoreapp3.1").WithFiles(ENGINE_CORE_FILES).AndFiles(ENGINE_CORE_PDB_FILES),
129134
HasDirectory("bin/agents/net462").WithFiles(AGENT_FILES).AndFiles(AGENT_PDB_FILES),
130135
HasDirectory("bin/agents/net6.0").WithFiles(AGENT_FILES_NETCORE).AndFiles(AGENT_PDB_FILES_NETCORE),

src/NUnitEngine/nunit.engine.core/Services/ExtensionManager.cs

+10-1
Original file line numberDiff line numberDiff line change
@@ -384,6 +384,7 @@ private void ProcessAddinsFile(IFile addinsFile, bool fromWildCard)
384384
string entryDir = entry.DirectoryName;
385385
string entryFile = entry.FileName;
386386

387+
log.Debug($"Processing entry {entry.Text}");
387388
if (entry.IsDirectory)
388389
{
389390
if (entry.IsFullyQualified)
@@ -412,9 +413,14 @@ private void ProcessAddinsFile(IFile addinsFile, bool fromWildCard)
412413

413414
private void ProcessCandidateAssembly(string filePath, bool fromWildCard)
414415
{
416+
log.Debug($"Processing candidate assembly {filePath}");
417+
415418
// Did we already process this file?
416419
if (_assemblies.ByPath.ContainsKey(filePath))
420+
{
421+
log.Debug(" Skipping assembly already processed");
417422
return;
423+
}
418424

419425
try
420426
{
@@ -423,10 +429,12 @@ private void ProcessCandidateAssembly(string filePath, bool fromWildCard)
423429

424430
// We never add assemblies unless the host can load them
425431
if (!CanLoadTargetFramework(Assembly.GetEntryAssembly(), candidateAssembly))
432+
{
433+
log.Debug(" Unable to load this assembly");
426434
return;
435+
}
427436

428437
// Do we already have a copy of the same assembly at a different path?
429-
//if (_assemblies.ByName.ContainsKey(assemblyName))
430438
if (_assemblies.ByName.TryGetValue(assemblyName, out ExtensionAssembly existing))
431439
{
432440
if (candidateAssembly.IsBetterVersionOf(existing))
@@ -435,6 +443,7 @@ private void ProcessCandidateAssembly(string filePath, bool fromWildCard)
435443
return;
436444
}
437445

446+
log.Debug(" Adding this assembly");
438447
_assemblies.Add(candidateAssembly);
439448
}
440449
catch (BadImageFormatException e)
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
addins/nunit.v2.driver.dll
2-
addins/nunit-v2-result-writer.dll
3-
addins/nunit-project-loader.dll
4-
addins/vs-project-loader.dll
5-
addins/teamcity-event-listener.dll
1+
../../../bundled-extensions/NUnit.Extension.*/tools/**/

0 commit comments

Comments
 (0)