I know this may be a silly question but are you sure you are building your DLL using the same .NET framework version as the OneStream platform? I assume you are using Visual Studio?
If you are on-premise then you might be able to download & install a Dependency Walker tool for .NET, and check the dlls with that.
But this really goes into the area of advanced consulting on a one-to-one basis , which we can't do for free on forums like this, especially without any knowledge of the specific environment.
There is some guidance in the Design & Reference guide ( Defining a Reference to an External .NET DLL ) , but I think you are already past that level. There is no other published documentation that I am aware of that takes this step any further.