Skip to content

Commit 059acce

Browse files
committed
Replace ExecutingAssembly assumptions with EntryAssembly assumptions,
this works around the broken EnsureReferenceToAddInLibrary for EarlyBound unit tests that M.Doerner brought up in chat
1 parent 8f12a16 commit 059acce

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Rubberduck.Core/UnitTesting/ProjectTestExtensions.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,9 @@ public static class ProjectTestExtensions
1010
{
1111
public static void EnsureReferenceToAddInLibrary(this IVBProject project)
1212
{
13-
var assembly = Assembly.GetExecutingAssembly();
13+
// FIXME should rely on the assembly containing the UnitTest components.
14+
// Those are not necessarily the same.
15+
var assembly = Assembly.GetEntryAssembly();
1416

1517
var name = assembly.GetName().Name.Replace('.', '_');
1618
var referencePath = Path.ChangeExtension(assembly.Location, ".tlb");

0 commit comments

Comments
 (0)