Search code examples
c#wcfwindows-phone-8background-agent

Referencing WCF service from WP8 background agent


I have stumbled upon a problem referencing WCF service from Windows Phone background agent.

I have two projects in my solution

  1. Windows Phone App
  2. Background agent

I'm referencing two services in my WP app. I want the background agent to periodically call method from on of the services.

However when I add service reference to the agent I get this error

Payload contains two or more files with the same destination path 'ServiceReferences.ClientConfig'. Source files: ...\Client\WPClient\WPClient\ServiceReferences.ClientConfig ...\Client\WPClient\WPTaskAgent\ServiceReferences.ClientConfig

Is there a way to get rid of this error or work around it?

Thank you


Solution

  • changing the name of the file ServiceReferences.ClientConfig to [projectName]_ServiceReferences.ClientConfig within the class library worked for me.