Problem compiling SimpleApp Silverlight sampleProblem compiling SimpleApp Silverlight sample
Old forum URL: forums.lhotka.net/forums/t/6749.aspx
fernandoacorreia posted on Monday, April 06, 2009
I downloaded lightsamples-3.6.2-090322 and cslalightcs-3.6.2-090322.
I compiled cslalightcs and cslacs.
Then I opened the sample solution SimpleApp.sln and updated the references to Csla, pointing to the DLLs I created before; I pointed the Silverlight projects to the SL assembly and the .NET projects to the .NET assembly.
Even so, when I compile the sample projects I get errors. For instance in Library.Client:
Error 1 The type arguments for method 'Csla.BusinessBase<Library.CustomerEdit>.RegisterProperty<P>(Csla.PropertyInfo<P>)' cannot be inferred from the usage. Try specifying the type arguments explicitly. C:\Users\Fernando\Downloads\CSLA\lightsamples-3.6.2-090322\CslaLight\cs\SimpleApp\Library.Server\CustomerEdit.cs 15 51 Library.Client
And in Library.Server:
Error 1 The type arguments for method 'Csla.BusinessBase<Library.CustomerEdit>.RegisterProperty<P>(Csla.PropertyInfo<P>)' cannot be inferred from the usage. Try specifying the type arguments explicitly. C:\Users\Fernando\Downloads\CSLA\lightsamples-3.6.2-090322\CslaLight\cs\SimpleApp\Library.Server\CustomerEdit.cs 15 51 Library.Server
The setup experience to try these samples is a little frustrating. The README doesn't help me much either, so I'm turning to this forum. I hope someone can point out my mistake.
Thanks.
fernandoacorreia replied on Monday, April 06, 2009
An update: I'm new to this, but maybe the sample code is simply out of date? If I change the property declarations the code compiles.
private static PropertyInfo<int> IdProperty = RegisterProperty<int>(c =>c.Id);
...
private static PropertyInfo<string> NameProperty = RegisterProperty<string>(c => c.Name);
...
private static PropertyInfo<string> StatusProperty = RegisterProperty<string>(c => c.Status);
Copyright (c) Marimer LLC