I used the prerequisite installer to make sure LightSwitch would be happy, then I installed the real thing. I then spun out a simple contact manager in a couple of minutes. It was amazingly easy to build an application that allows you to search contacts, add new contacts, and edit contacts. Unfortunately, I built the solution to encounter errors (without any code)!
Error 2 The type or namespace name 'RoundtripOriginalAttribute' does not exist in the namespace 'System.ComponentModel.DataAnnotations' (are you missing an assembly reference?) 56 c:\Projects\Application1\Application1\ClientGenerated\GeneratedArtifacts\DataClientImplementation.cs 34 ClientGenerated
Along with several other errors related to references. I could not find an add reference button, so I added it to the project manually (I verified the assembly was in the GAC). It still did not work.
I uninstalled WCF RIA Services for Visual Studio 2010 (installed by the prerequisite installer), then used the installer from Silverlight.net. That fixed the problem. I don’t know if it was a fluke with my system or if others will encounter this problem, but it’s easy enough to correct.
*UPDATE*
The correct dll (System.ServiceModel.DomainServices.Server.dll) isn't in the GAC. I was looking at the wrong assembly. WCF RIA Services for Visual Studio 2010 was installed at the time, however, and there didn't appear to be any problems with it. I don't want to dig deeper when it was likely something wrong with the installation, so if you experience the problem, just reinstall RIA Services.
*UPDATE 2*
This isn’t limited to my machine, and there is another invalid state you can reach. I posted this issue in the Lightswitch forums and Kris Langhor responded.
Thanks for the information. This is an issue that we are currently working to address for a future release. The issue is related to the install order of the components. The Lightswitch prerequisites are specifically designed for provisioning a server that will not have the Lightswitch IDE installed on it. They install the WCF Ria Services bits in a Server-only mode that does not contain all of the assemblies. For a development machine you need only run the Lightswitch Web Install or setup from the CD. That will install the full WCF Ria Services stack that is required by the designer.
When you follow the install steps that you have outlined you will get 1 of 2 results:
1) You end up in the state the you arrived at where Lightswitch installs but has compile errors. To work around that you need to uninstall WCF Ria Services and reinstall as you outlined.
OR
2) The Lightswitch install will report an install error and report it failed to install WCF Ria Services. In this case you should uninstall the version of Ria Services that is installed on your machine and then re-run the Lightswitch installer.
Hopefully this helps clarify the issue and provides folks wiht sufficient infromation to help workaround the issue.
This is a Beta, so don’t expect everything to work perfectly! I put this on my blog and posted to the forums to help others out who may run into the same problem.