Tag Archives: WCF

Cannot find 'servicereferences.clientconfig' in the .xap application package

I’m new to Silverlight development.  I was banging my head against the wall, trying to figure out what I had done to break our Silverlight app.  After all, the only changes I made were to add a Service Reference to a new WCF service, and to initialize the WCF proxy in App.xaml.cs.

Fortunately, after a little Google sleuthing, I came upon the solution, as shared by David Sandor:

[The code] is trying to read from the ServiceReferences.config file that can not be read at that point in the Silverlight application’s lifecycle.

Bingo, that was it.  Moving my proxy initialization code to Application_Startup fixed the problem.

It makes sense now, but, man, these types of bugs can be maddening.