Is there an easy way to add a service link to one assembly, but save the client configuration in another?

I know about the drawbacks of simply adding WCF service links (later I intend to create client proxies differently), but now I need to add a service link to the Silverlight assembly, but the config for the main user interface assembly so that it will be packed into a .xap file. Is there an easy way to do this?

+4
source share
1 answer

vorrtex in the comments turns out to be correct. I lost sight of this solution after several experiments. I also forgot to mention that I used the xml conversion tasks in the .csproj file.

My final decision is as follows:

  • In the Silverlight service client assembly, add WCF links as usual.
  • Add ServiceReferences.Configuration.ClientConfig for each build configuration
  • Add goals before / after building goal transformation in .csproj
  • Add as a reference in the main Silverlight UI assembly.
  • Build. The Silverlight web assembly creates an .xap for this configuration with the correct ServiceReferences.ClientConfig file.
0
source

All Articles