If you are using XNA Game Studio 4.0 to create an application targeted to Windows Phone 7, you may have tried to add a service reference to a WCF service inside visual studio and been stuck…
This appears to be a known issue – there is an easy workaround doing this manually with the Silverlight version of the SvcUtil application.
- Launch a command prompt
- Navigate to: C:Program Files (x86)Microsoft SDKsWindows Phonev7.0Tools
- Run SLSvcUtil /d:<output directory> <path to wsdl>
- Add the two created files (*.cs, and ServiceReferences.ClientConfig) to your existing XNA Project
- Select ServiceReferences.ClientConfig if the Solution explorer and change “Build Action” to “Content”
Here is an example of using the command:
C:Program Files (x86)Microsoft SDKsWindows Phonev7.0Tools>slsvcutil /d:c:mycode http://test.com/test.svc?wsdl
Be sure to leverage the MSDN article for more information:
http://msdn.microsoft.com/en-us/library/cc197958%28v=vs.95%29.aspx