today I started to use this toolkit in my windows phone application, but I have a problem:
I used the Sql Server Compact Toolbox for create the datacontext from a sqlce. the class generated, contains this statement:
private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty);
this row cause an error in design mode: Common Language Runtime detected an invalid program.
I found this error, because i was implementing the DesignDataService and I wanted to return some instance of a class genereated by the SqlServerCompactToolbox.
So, if i put this code:
var a = new System.ComponentModel.PropertyChangingEventArgs("aa");
catch (System.Exception ex)
in a constructor of a viewmodel, when I try to open its view in the designer (both in Visual Studio and Expression Blend), the program show the messagebox with the error.
I know I can change the code in the class generated by SqlServerCompactToolbox, but, if it's possible, I would like to understand why it's happen and if it's normal.
It happens both in the 3.1 version and in the 4.0beta version of the toolkit.
If you need it, I can prepare a very small project to show the problem, anyway if you add the above snippet code in a viewmodel constructor you can see the error.