I have some problems with generating proxy classes.
I have wcf service project and silverlight 4 project in one solution.
I try to set up build process with command line.
The silverlight 4 project start build after wcf project.
In before build target of silverlight 4 project i am use SlSvcUtil.exe tool to generate proxy classes by wcf service dll and get error: "No endpoints compatible with Silverlight 4 were found. The generated client class will not be usable unless endpoint information is provided via the constructor."
Proxy classes are generated correctly, but build process stopped with error.
I can not use generating proxy classes by running serivce, because build proccess must be independent of external services.
Anybody know how to fix this problem?
I think that you use a not supported binding in Silverlight 4 for your WCF service. The only supported binding in Silverlight can you find on msdn http://msdn.microsoft.com/en-us/library/cc896571(VS.95).aspx.
Check if your binding of your WCF service is supported with Silverlight.
Thank you for answer.
I am using basicHttpBinding which supported Silverlight 4.
Now i resolve this problem by skipping all errors during proxy classes generating in msbuild task, and all works fine.
But it is not good solution.
Anybody know how to solve this problem?
I was confused about your situation.
How you create the wcf service for silverlight?
First, refer to the link below:
I've checked the example and it works well.
- I try to set up build process with command line.
- I can not use generating proxy classes by running serivce, because build proccess must be independent of external services. So i have only wcf service dll with contracts, which builds at same solution earlier. So i can not use method which described here: http://www.codeproject.com/Articles/37393/4-Simple-Steps-to-Consume-WCF-Service-using-Silver
I known some methods to get proxy classes for comunicating with wcf service:
- use Add Service Refference command in VS (not compatible with my requirements, because can not by use in automatic build)
- use slsvcutils.exe and remote wcf service uri (not compatible too, because wcf service builds in same solution)
- use slsvcutils.exe, svcutils.exe and wcf service library dll. SvcUtils.exe tool use for getting wsdl and xsd files by wcf service library dll (SLSvcutils.exe can not do this), and SLSvcutils.exe use for generating proxy classes by wsdl and xsd files. This method is compatible with my requirements but works with error. Interestingly, if i skip this error during generation, proxy classes are generated correctly? and works fine for communication with service.
Anybody known how to organize command line build with proxy classes generating ?