I thought I’d blog about this… because it was certainly unexpected. The RIA Services Toolkit. I’m currently working with the May 2010 release. I’ve used it to do all kinds of cool JSON work using my pre-existing Silverlight RIA Services domain methods. It’s fun and really gets you into thinking about Silverlight and HTML 5 client web applications.
Unfortunately, it comes with a side-effect which impacts Silverlight projects that have any “Silverlight enabled WCF Service” references. (As my project did.) I use WCF services to quickly pull run-time configuration data from the server. Since Silverlight gets packaged up and compiled as a *.XAP file… it’s not easy to modify any server-specific settings when moving the Silverlight project from DEV, to QA, and then to PROD. So I use simple WCF endpoints to pull down configuration information at runtime where necessary.
The impact is that “RIA Services Toolkit” modifies your Silverlight Project file such that any linked Web projects will be scanned for “Silverlight enabled WCF Services”. Once any WCF services are found, VS2010 will automatically generate a GeneratedWCFClientCode hidden folder and drop the service proxy class in it at compile time! (Similar to how it generates the Generated_Code folder for RIA Services proxy classes.) It also automatically appends or overwrites the appropriate settings in the ServiceReferences.ClientConfig file typically associated with WCF references from Silverlight.
Here is a link to the article that explains more about all this in details.
Consider yourself warned…
BTW, the article points out how to disable this “feature” that is created in VS2010 after installing the RIA Services Toolkit.