I am a regular user of CodeComplete on a quest to get my Business Objects to work from Silverlight. I am posting my findings along the way here, hopefully they will be of some help to other Csla / CodeComplete users. First I made a Silverlight Class Library with the same Namespace and AssemblyName as my BusinessLayer project. Namespace used in my Application is Trackit, so both SL and Non SL project has Namespace Trackit.BusinessLayer. Added reference from this project to the Silverlight version of csla.dll. Linked Classes from CodeComplete.Services to CodeComplete.Services.Silverlight. This can be done manually in Visual Studio by using Add Exsisting Item + Add As Link or you can install the Projectlinker tool that is available from MS Patterns & Practices: http://www.codeplex.com/CompositeWPF/Release/ProjectReleases.aspx?ReleaseId=20738 It allows you to choose a parent project for your Silverlight Project and as files are added to that project they are automatically added as links to your Silverlight project. If you exclude a bunch of classes by excluding marked classes or Directory from the parent project and then include them in that project they will all be added as links to your Silverlight project. Changes to generated classes: Each BL Class and BL Lists File: #if !SILVERLIGHT using Trackit.DataLayer; #endif added to all Designer Files. using Csla.Serialization; For SilverLight to understand [Serializable()] Each BL Class and BL Lists Designer File - excluded all the DataAccess and Export methods from SILVERLIGHT. #region "Data Access" #if !SILVERLIGHT #endif #endregion (Make sure the Criteria Class definition is before the #if !SILVERLIGHT line ) #region "Export" #if !SILVERLIGHT #endif #endregion End of Part 1 - More coming soon. Paul Solheim www.faktnet.com |