I have a base abstract class that exists in a nuget package that I am implementing a concrete class for, something like this:
public class MyConcreteClass : MyBaseAbstractClass<SomeType> {
public MyConcreteClass(IAnInterfaceOne interfaceOne, IAnInterfaceTwo interfaceTwo) : base(interfaceOne, interfaceTwo) { }
}
I am mocking the two parameters like so:
var mockFirst = new Mock<IAnInterfaceOne>();
var mockSecond = new Mock<IAnInterfaceTwo>();
and the concrete class like so:
var mockConcrete = new Mock<MyConcreteClass>(mockFirst.Object, mockSecond.Object);
When I try to access the Object
property within mockConcrete
var concreteObjectInstance = mockConcrete.Object
I get a FileNotFoundException
, Could not load file or assembly 'Serilog.dll'
and the debugger in VS points to the base constructor call for where the exception is coming from:
base(interfaceOne, interfaceTwo)
Castle.Core
and Moq
versions:
<package id="Castle.Core" version="3.3.3" targetFramework="net452" />
<package id="Moq" version="4.5.21" targetFramework="net452" />
I have searched through the nuget package where the base class resides in and there are no references or usages of serilog. I searched Castle.Core
's repo and found many usages of serilog which I believe is a logging library. So I am a bit confused on how this exception is occuring and how I can try to resolve it so it does not throw the exception when I mock my object.