views:

47

answers:

2

Initially created a WCF service with one method and everything works fine. I tried to add a new method to the service and for some reason when I try to update the service it does not find this new method. Any advice?

+2  A: 

Is the service in the same solution as the Silverlight app? That seems to help when updating the service. Also, are you sure your service is compiling and starting correctly? If there is a problem, VS can't read the WSDL and nothing gets updated.

Other than that, sometimes VS just doesn't refresh it right for me and it's faster just to re-create it.

Joe Doyle
I tried to delete/recreate but that didn't work.
Weston Goodwin
+1  A: 

I had to add

[OperationContract]

Above each new function in the IService1.cs file. So now the IService1.cs file looks like this:

[ServiceContract] public interface IService1 { [OperationContract] List func1();

    [OperationContract]
    double func2();
}
Weston Goodwin
Yup, that is required when using WCF.
Joe Doyle