If the classes that I want to reuse are in another assembly, I don't have a problem.
But if I want to add a service reference to an assembly that contains classes I would like the service reference to reuse, they don't get reused. I suspect it has something to do with how it works, as pointed out here:
The s开发者_StackOverflow中文版ervice reference code generator is unable to recognize the re-used types unless the referenced assembly that contains the re-used types is built and on the disk.
Obviously as the assembly I'm adding the reference to also contains the classes then it can't be compiled on the disk as-is for the code-generator. It's a sort of catch-22. But is there a simple way to achieve this without manually creating a service reference or using a satellite assembly for my models?
I solved it! Sometimes after a while of thinking, writing it out on here makes you think differently somehow... anyway, my solution at the moment is to generate the service reference in another assembly and just copy it across and update the namespace. Simple!
精彩评论