Derik Whittaker



'ServiceReferences.ClientConfig' in the .xap application package Error in WP7

If you are trying to create a WP7 (or any silverlight project for that matter) and you are trying to access a WCF web service you may receive the following error when you try to create an instance of the WCF service.

Cannot find 'ServiceReferences.ClientConfig' in the .xap application package. This file is used to configure client proxies for web services, and allows the application to locate the services it needs. Either include this file in the application package, or modify your code to use a client proxy constructor that specifies the service address and binding explicitly. Please see inner exception for details.

In my project I saw this because my WCF service references were NOT in the UI project, they were in a common/domain project.  Because of this the ServiceReferences.ClientConfig file was not being put in to the .xap package.  To solve this you simply need add a reference of the ServiceREferences.ClientConfig file inside your UI project.  Recompile and the problem goes away.

Hope this helps.

Till next time,

Posted 07-12-2010 8:53 AM by Derik Whittaker
Filed under: ,


About The CodeBetter.Com Blog Network
CodeBetter.Com FAQ

Our Mission

Advertisers should contact Brendan

Google Reader or Homepage Latest Items
Add to My Yahoo!
Subscribe with Bloglines
Subscribe in NewsGator Online
Subscribe with myFeedster
Add to My AOL
Furl Latest Items
Subscribe in Rojo

Member Projects
DimeCasts.Net - Derik Whittaker

Friends of
Red-Gate Tools For SQL and .NET


SmartInspect .NET Logging
NGEDIT: ViEmu and Codekana
NHibernate Profiler
Balsamiq Mockups
JetBrains - ReSharper
Web Sequence Diagrams
Ducksboard<-- NEW Friend!


Site Copyright © 2007 CodeBetter.Com
Content Copyright Individual Bloggers


Community Server (Commercial Edition)