Strange behaviour of PTIdentity using statements

Strange behaviour of PTIdentity using statements

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


griff posted on Wednesday, April 04, 2012

Hi

using latest csla 4.3.10.

I have used the PTIndentity and PTPrincipal sample code in my project - hooked up and working well.

However, if I amend these classes and save I get an error (any type of editing e.g adding a space):........

The using Csla.Serialization disappears from the code below.

using System;
using Csla;
using Csla.Security;
using Csla.Serialization;
;
 
namespace WACA.Business.Security
{
    [Serializable]
    public class PTIdentity : CslaIdentityBase<PTIdentity>

and I get the following error:
type or namespace name 'SerializableAttribute' could not be found (are you missing a using directive or an assembly reference?)	D:\Users\Richard\Development\VS2010\SLApps\WACA\WACA.Business\Security\PTIdentity.cs	7	6	WACA.Business.SL

However, if I don't save using the Save toolbar icon and instead close the code tab (VS2010) and accept the 'save changes' prompt  then it compiles okay and off we go all okay.
Anybody have any clues.
Richard





 

RockfordLhotka replied on Friday, April 06, 2012

Are you running any VS add-ins that might alter or refactor your code?

JonnyBee replied on Saturday, April 07, 2012

Or you have a Silverlight project that references CSLA.dll for .net.

IIRC Silverlight does not have Serializable attribute so this is reimplemented in CSLA.dll for Silverlight.

griff replied on Tuesday, April 10, 2012

Yes I do have a number of VS addins - some that refactor - presumably I need to switch these off and test.  (I have checked all my references and they seem okay) - thanks

Copyright (c) Marimer LLC