Sorry for asking this naive question which is even difficult for me to describe. I have a classlibrary project say 'A' that has logic that I am referring in Project 'B' via Assembly reference (added the dll reference of Project 'A') which is basically an unit test project. Project 'A' uses some third party assemblies like Serilog, Newtonsoft. So now in an Unit test in Project 'B' when I invoke the methods of a class from Project 'A', I see my test fails with file not found exception and its referring the assembly files like Serilog and NewtonSoft which were there in project 'A'. So I was puzzled that my project 'B' doesn't need any of those libraries directly, only project 'A' needs them. But still to remove the error one by one I added the same assembly references in Project 'B' as well and it resolved the error.
But I didn't understand why I needed to add the same assemblies again in Project 'B'. This kind of defies the purpose where I am trying to abstract the logic in separate project so that other projects doesn't have to repeat the same thing? With this logic now every other unit test project that I am going to write in future referring the Project 'A' would require the same kind assembly reference which appears to be an overhead.
If this is relevant: My class library project 'A' is a .NET Standard 2.0 based project and project 'B' is a .NET Core 2.1 console application type of project.
If this is a repeated question please direct me, I want to understand how this works. If there is a C# concept behind this behavior please let me know and I will read more on it. Also does this behavior varies based on the type of 3rd party library we are using like if its logging vs any other type of library?
Thanks in advance!