Hi,
i am currently developing a Client/Server achitecture based on Windows Communication Foundation technology.
In my solution, i have a Self-hosted WCF service in a WPF Application, a WPF client application, a Contracts/Data library with severals interfaces and classes used as servicecontract and knowntype in the WCF service.
For now, everything work when connecting the WCF service with the WPF client with the contracts/data library as reference in both.
But now im facing a problem where i need to create a silverlight client that will re-use the same contracts/data library and be able to communicate with the WCF service(just like the WPF client is doing it).
Since we cant use Windows based library as reference in a silverlight application, what should i do now?
Thanks in advance!
1. Create a project, Create one more project of type "Siliverlight ClassLibraray" in the WCF server solution file.
2. Add files. Right on the above silverlight project and select "Existing item" . Select your existing Windows based library file. But before client "Add" button select the down arrow and select "Add as link".
In this way you have one source. When you update in windows based library, ur Silverlight libraray also will be updated automatically every time u build. The will create a Silverlight DLL. Now point to this DLL in your silverlight application.
Hope it helps.