Activity log for bug #860558

Date Who What changed Old value New value Message
2011-09-27 13:24:10 ExM bug added bug
2012-01-06 22:30:07 ExM attachment added simpleNUnitTest.zip https://bugs.launchpad.net/nunitv2/+bug/860558/+attachment/2660538/+files/simpleNUnitTest.zip
2012-01-06 22:31:51 ExM description if the assembly `pnunit.tests.dll` located in another directory then the process `nunit-agent.exe` can not download the file `nunit-agent.exe` as a dll library. I recommend the following modification of the file: === modify file src/NUnitCore/core/AssemblyResolver.cs --- src/NUnitCore/core/AssemblyResolver.cs 2009-02-01 05:16:27 +0000 +++ src/NUnitCore/core/AssemblyResolver.cs 2011-09-09 09:28:02 +0000 @@ -9,7 +9,8 @@ using System; using System.IO; using System.Reflection; - using System.Collections; + using System.Collections; + using System.Collections.Generic; /// <summary> /// Class adapted from NUnitAddin for use in handling assemblies that are not @@ -92,8 +93,11 @@ } foreach( string dir in _dirs ) - { - foreach( string file in Directory.GetFiles( dir, "*.dll" ) ) + { + List<string> dllCandidates = new List<string>(); + dllCandidates.AddRange(Directory.GetFiles(dir, "*.dll")); + dllCandidates.AddRange(Directory.GetFiles(dir, "*.exe")); + foreach (string file in dllCandidates) { string fullFile = Path.Combine( dir, file ); AssemblyReader rdr = new AssemblyReader(fullFile); if the assembly `pnunit.tests.dll` located in another directory then the process `pnunit-agent.exe` can not download the file `pnunit-agent.exe` as a dll library. I recommend the following modification of the file: === modify file src/NUnitCore/core/AssemblyResolver.cs --- src/NUnitCore/core/AssemblyResolver.cs 2009-02-01 05:16:27 +0000 +++ src/NUnitCore/core/AssemblyResolver.cs 2011-09-09 09:28:02 +0000 @@ -9,7 +9,8 @@   using System;   using System.IO;   using System.Reflection; - using System.Collections; + using System.Collections; + using System.Collections.Generic;   /// <summary>   /// Class adapted from NUnitAddin for use in handling assemblies that are not @@ -92,8 +93,11 @@     }     foreach( string dir in _dirs ) - { - foreach( string file in Directory.GetFiles( dir, "*.dll" ) ) + { + List<string> dllCandidates = new List<string>(); + dllCandidates.AddRange(Directory.GetFiles(dir, "*.dll")); + dllCandidates.AddRange(Directory.GetFiles(dir, "*.exe")); + foreach (string file in dllCandidates)      {       string fullFile = Path.Combine( dir, file );                      AssemblyReader rdr = new AssemblyReader(fullFile);
2012-01-14 02:50:53 Charlie Poole nunitv2: status New In Progress
2012-01-14 02:50:58 Charlie Poole nunitv2: assignee Charlie Poole (charlie.poole)
2012-01-14 02:51:03 Charlie Poole nunitv2: importance Undecided Medium
2012-01-17 23:46:49 Charlie Poole nunitv2: status In Progress Fix Committed
2012-01-17 23:47:23 Launchpad Janitor branch linked lp:nunitv2
2012-01-17 23:47:37 Charlie Poole nunitv2: milestone 2.6.0b4
2012-01-18 17:06:25 Charlie Poole nunitv2: status Fix Committed Fix Released