Custom code from my v3.5 project removed by v4.0

Posts   
 
    
DaveR
User
Posts: 43
Joined: 15-Jun-2004
# Posted on: 26-Jun-2013 16:11:01   

Opened a v3.5 project in v4.0 and generated the code to the same location as the previously generated code. Custom code within TypedView was removed.

The v3.5 generated code in the TypedView class looked like this:

namespace MyNameSpace.TypedViewClasses { public partial class MyViewTypedView : TypedViewBase<MyViewRow>, ITypedView { .... internal DataColumn MyLastColumn { .... } // __LLBLGENPRO_USER_CODE_REGION_START AdditionalColumnProperties // __LLBLGENPRO_USER_CODE_REGION_END #endregion

    #region Custom Typed View code

    // __LLBLGENPRO_USER_CODE_REGION_START CustomTypedViewCode
    public bool MyCustomMethod()
    {
          ....
    }
    // __LLBLGENPRO_USER_CODE_REGION_END
    #endregion

When generating the code with the same project in v4.0, the definition of MyCustomMethod() was completely removed:

    #region Custom Typed View code
    // __LLBLGENPRO_USER_CODE_REGION_START CustomTypedViewCode 
    // __LLBLGENPRO_USER_CODE_REGION_END 

    #endregion

How do I get LLBLGen v4.0 to preserve all the custom code in my v3.5 generated code?

Walaa avatar
Walaa
Support Team
Posts: 14946
Joined: 21-Aug-2005
# Posted on: 26-Jun-2013 19:10:56   

Please try this for me: On the v.4.0 generated code, if you edit inside any of the user code regions, would it be preserved when regenerating?

Btw, which Designer version (release date) are you using?

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39588
Joined: 17-Aug-2003
# Posted on: 27-Jun-2013 12:44:14   

Can't reproduce it. Created v3.5 project, (selfservicing) added code to two regions, among them the one you used too, regenerated code with v4.0 on top of it, code added was still there. Verified that the class was indeed overwritten.

Frans Bouma | Lead developer LLBLGen Pro