Skip to content

Commit 1bd91e9

Browse files
committed
Updating some path issues, related to the nunit 3 update.
Related #284
1 parent 94bdd7d commit 1bd91e9

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

mdoc/mdoc.Test/BasicTests.cs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,18 @@ protected TypeDefinition GetType(string filepath, string classname)
2121

2222
if (!moduleCash.ContainsKey(filepath))
2323
{
24-
var readModule = ModuleDefinition.ReadModule(filepath);
24+
var fullpath = Path.Combine (Path.GetDirectoryName (this.GetType ().Module.Assembly.Location), filepath);
25+
var resolver = new DefaultAssemblyResolver ();
26+
var testAssemblyPath = Path.GetDirectoryName (this.GetType ().Module.Assembly.Location);
27+
resolver.AddSearchDirectory (testAssemblyPath);
28+
29+
ReaderParameters p = new ReaderParameters ()
30+
{
31+
AssemblyResolver = resolver
32+
};
33+
34+
35+
var readModule = ModuleDefinition.ReadModule(fullpath, p);
2536
moduleCash.Add(filepath, readModule);
2637
}
2738

0 commit comments

Comments
 (0)