It is easy to generate a proxy for a service (which has a wsdl) with svcutil.exe
.
With the command
call "%VS100COMNTOOLS%"\vsvars32.bat
svcutil.exe http://localhost:8754/MyService.svc?wsdl /out:MyProxy.cs /config:MyProxy.config
two files are generated, which are
MyProxy.cs
MyProxy.config
So, I have this wonderful files which can be used by all applications that want to call MyService
.
But there seems to be no proper way of reusing them.
The config has always to be copied to the client-applications App.config
.
So, I can have a library, but there is only the MyProxy.cs in it.
The client-application still has to reference System.ServiceModel
and System.Runtime.Serialisation
assemblys on its own.
This is somewhat cumbersome.
Is there any way to "inject" that MyProxy.config
or even better have a library that just can be referenced and used in the client-application?