I have been running into this odd error off and on for the past week with the code generated by the Linq to SQL designer. I kept on getting Error 1 Build failed due to validation errors in C:\xxx\DB.dbml.... when I tried to build. Thanks to google (a developers best friend) I ran into a blog entry by Rick Strahl that talked about resetting Visual Studio Packages. Well it turns out this is solves my issue but I had to follow these steps to get it to work.
- run devenv /ResetSkipPkgs
- clean the solution
- recompile
I really hope they fix this with SP2 or in VS 10.
I was suprised to find out that Silverlight Data Binding uses OneWay as the default binding mode. This really caught me off guard when I was trying to port some code written in WPF over to Silverlight since all of my TextBox.Text bindings did not have an entry for Mode in the binding statement. The reason of course is that by default TextBox.Text uses a Mode of TwoWay in WPF. In fact many of the common controls like TextBox.Text, ComboBox.Text, MenuItem.IsChecked, etc. have TwoWay as their default mode.
If you are writing code that will be used on both platforms I would suggest adding Mode to the binding statement. It's a pain but it will save you the debugging hassle when your UI is not passing values back to the classes it is bound to.