10. June 2008 07:27
When upgrading an existing Silverlight project to silverlight 2 beta 2 you might encounter the following error:
"The type or namespace name 'DataGrid' does not exist in the namespace 'System.Windows.Controls' (are you missing an assembly reference?)"
To solve the problem:
1. First go to your project references (Expand your project references sub tree in the Visual Studio IDE) and look for System.Windows.Controls.Data in the reference list.
(If it does not exist in the list then you probably had the problem before the upgrade and you need to add a reference to System.Windows.Controls.Data by going to Project/Add Reference/.Net and choosing it from the list)
2. Press the right button on the System.Windows.Controls.Data reference and choose properties.
3. If the "Specific Version" property is set to true, change the "Specific Version" property to False.
4. Rebuild the project/solution.
This solved the problem for us on several Silverlight projects using a DataGrid.