Skip to content

Commit 73e43f5

Browse files
authored
Merge pull request #9 from NetOfficeFw/cleanaddin_task_bugfix
2 parents 41185a3 + 6d80856 commit 73e43f5

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/CleanAddin.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
using System;
2+
using System.IO;
23
using Microsoft.Build.Framework;
34
using Microsoft.Build.Utilities;
45

@@ -16,6 +17,9 @@ public override bool Execute()
1617
try
1718
{
1819
var assemblyPath = this.AssemblyPath.ItemSpec;
20+
var assemblyDir = Path.GetDirectoryName(assemblyPath);
21+
22+
AppDomain.CurrentDomain.ReflectionOnlyAssemblyResolve += (sender, args) => AssemblyEx.ReflectionOnlyAssemblyResolve(args, assemblyDir);
1923

2024
var assembly = AssemblyEx.ReflectionOnlyLoadAssembly(assemblyPath);
2125
var publicTypes = assembly.GetExportedTypes();

0 commit comments

Comments
 (0)