There is a thin point here in the build dependencies that I would like to understand. I have a project that uses SharpDX through a custom shell, for example:
SharpDX.dll <- Wrapper.dll <- Project.dll
There is a type in Wrapper.dll such as:
public class D3DWrapperTypeA {
In this class, if I uncomment the commented constructor, then Project.dll should refer to SharpDX.dll, even if it does not use the constructor.
However, I also have another type of shell:
public class WrapperTypeB { public SharpDX.Device GetDevice(int adapter) {
And here, until I actually use the GetDevice method, which returns the SharpDX object, Project.dll does not need to reference SharpDX.dll.
Why does even an unused constructor that accepts a parameter of type SharpDX call a dependency on SharpDX, while an unused method that returns a parameter of type SharpDX does not work?
source share