Question

I have a class implementing some audit methods (AuditcClass.cs). I have also implemented a WCF service that uses the AuditcClass.dll methods.

Now I need to be able also to reference the WCF service from within the AuditcClass. However I cannot simply use the generated proxies to reference it, since there are several conflicts with namespaces.

As first approach, I encapsulated the proxy within another namespace, solving many conflicts, but still introducing new ones with other general classes (as example, Exceptions namespace).

Is there an approach by which I could reference the web service within the class, even if the service uses the same class' methods and enums?

Was it helpful?

Solution

I was able to solve my issue by using the parameter /reference:<file path> of the svcutil tool:

References types in the specified assembly. When generating clients, use this option to specify assemblies that might contain types that represent the metadata being imported.

This allowed me to exclude from the generated proxy the shared dlls avoiding reference conflicts.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top