locked
state in generic service with references to other DLL RRS feed

  • Question

  • Hi,

    I have written a generic service interface and one service implementing it. Everything works fine, unless I include a [DataMember] to the generic state, where the type is defined in a third datatypes library.
    If I do so, the generic service sill compiles well, but the concrete service fails on compiling the transform, because there is no reference to the datatype library (which actuallly is listed in the reference of the concrete service)

    Workaround: Include a dummy additional member in concrete state implementation.

    Is there another (better?) way of ensuring dssproxy generates the right references when compiling the transform (proxy itself does not seem to be a problem, the .sln compiles just fine)

    Thanks,

    Michael
    Friday, December 7, 2007 2:32 PM

Answers

  • Yes, this is a known issue.  You've already discovered the nature of the problem. 

     

    Since your implementation service doesn't reference anything from that third service, VS automatically drops the reference.  Normally, this would be the right thing to do.  However, we use reflection to generate the transform, and then we do reference that field in the transform.  When we reflect on the references, this third assembly doesn't exist and we don't know to add it.

     

    I'm sorry for the hassle. We have an open issue to try to find a transparent workaround, but in the meantime, referencing the third assembly directly from your implementation service is the proper thing to do.

     

    Dave

    Friday, December 7, 2007 3:46 PM