I read this long time ago that we need to run CSLA based project using Release configuration. I don't remember where I have read it. Since then I was using my projects in release config only.
Can anybody if this is correct ? and if yes then what was the reason for this ?
But Now due to some req, i have to change it to Debug configuration while testing.. Once product is ready to publish only then i will change it to Release config.
Can anybody pls cfm if it is ok to test project like this and I won't be getting any unexpected errors if i switch to Release config.
I switch between Release and Debug all time and haven't encountered any errors.
I don't remember any such requirement. It shouldn't matter if you use Debug vs Release.
There was an issue some people had on the older code base when they did use release, the application would no longer function. That was due to using CanReadProperty / CanWriteProperty calls which didn't take a property name, and so used the stack trace to determine this.
However, release mode would do an optimization known as inlining, which basically takes code in your property get or set and embeds it directly into the caller, for performance reasons.
The solution was to stop using those methods and always specify the propery name, or an alternative would be to use an attribute to tell the compiler not to inline.
Newer versions of Csla which use the PropertyInfo should not suffer from these problems.
Thanks for the details.. My projects are all using now the new syntax of propertyinfo, so I think it will not be a problem.
Copyright (c) Marimer LLC