I have a project layout like this.
Assembly A -> Assembly B -> Assembly C.
Program lives in Assembly A.
ClassB lives in Assembly B.
ClassC lives in Assembly C.
I don't want AssemblyC to be directly accessible in AssemblyA. So I added PrivateAssets = "All" in the ProjectReference element in the AssemblyB.csproj file
ClassB creates a instance of ClassC.
Program creates a instance of ClassB.
But this is causing a System.IO.FileNotFoundException : Couldnot load file or assembly 'C'.
I have attached the project. Please look into it.
Dependency.zip