Published:
Monday, July 13, 2009
I've been working for several months on a Silverlight project and decided to upgraded from Silverlight 2 to Silverlight 3. The installs of the Toolkit and Visual Studio SDK's went well as did the upgrade to the project, however once the upgrade was done I compiled the project and was promptly smacked in the face with 182 compilation errors, 4 of which were Error 6 Custom tool error: Failed to generate code for the service reference 'Your Service Ref Name Here'. Please check other error and warning messages for details. 'Path to your Service Ref Resources File Here' and the rest were the typical cannot find, are you missing an assembly reference?
All of these errors, in one way or another, pertained to the Service References I had added to the Silverlight project. I have a WCF Services layer which the Silverlight App has references to in order to interact with the business layer of the application and thats where the trouble was. I tried to use the "Update Service Reference" option (right click on the Service Reference and select "Update") and well as the "Configure Service Reference" feature, neither resolved the issues.
I finally solved the problem by simply deleting my service references and re-adding them, the project then compiled successfully and I went on my merry way. It seems that under Silverlight 3 the way the underlying code for the Service References is generated has changed since version 2. I searched the web for information on this but didn't find anything of interest. Hope this helps if you end up in this situation.