CSLA 4.2 and silverlight

CSLA 4.2 and silverlight

Old forum URL: forums.lhotka.net/forums/t/11401.aspx

st3fanus posted on Thursday, June 07, 2012

Hi all..

I want to ask about my problem here

I want to do a personal learning to migrate my wpf app into silverlight use CSLA.NET

I use csla.net 4.2 and silverlight 4.

I don't know why after I created a business object in Lib.Net project ( .NET Class) and then I used that class as a Linked class from silverlight project which is ( Silverlight Class Library )

My Business Object Class can't compile !!!

I got these :

1. System.SerializationAttribute is inaccessible due to it's protection level.

2. [Serializable] could not be found ..


Is there some thing I'm missing ??

thanks a lot








RockfordLhotka replied on Thursday, June 07, 2012

Make sure your Silverlight class library project is referencing the Silverlight version of Csla.dll and that the .NET library is referencing the .NET version of Csla.dll.

The Csla.dll for .NET is not the same as the one for Silverlight.

st3fanus replied on Thursday, June 07, 2012

Hi Rocky thanks for your quick response...


Yes I have do that.

Lib.Net reference to Csla of .NET version

Lib.Sl reference to Csla of Silverlight version


and I can't use System.Data in my silverlight class BUT

for example in my ReadOnlyBase Class ( CustInfo), I need a System.Data.IReader for my Child_Fetch method,

How to do that ?


thanks a lot Roc



st3fanus replied on Friday, June 08, 2012

Hi Rocky ..


I'm sorry I forgot to tell a little bit info.

What should i used for Serialization ?

Csla.Serialization OR System.Serialization ?? ( I'm sorry because I'm still in the middle to develop app and learn csla with ui framework too )

so I often to miss something when I've never faced a problem.


thanks a lot


RockfordLhotka replied on Friday, June 08, 2012

I recommend using the data portal to communicate from the client to an app server. Your objects can then run on the client and app server, and the data portal takes care of serialization for you.

Your data access code runs on the app server. I typically surround my DataPortal_XYZ methods with a #if !SILVERLIGHT compiler directive, because there isn't a data access stack (no System.Data) on Silverlight.

There are numerous samples showing how this is done. And of course the Using CSLA 4 books cover all this in detail.

Copyright (c) Marimer LLC