Forum:  Custom Templates

Thread:  Small bug testing updating to v5.5 from v4.2


simmotech (User)   Posted on: 20-Feb-2019 13:23:54.
I have a custom template that starts
---
        #region Names
        /// <summary>More names added for consistency of access</summary>
        public static <[If IsSubType]>new <[EndIf]><[If UsePartialClasses]>partial <[EndIf]>class Names
        {
---

But the generated code
------
        // __LLBLGENPRO_USER_CODE_REGION_START CustomEntityCode
        // __LLBLGENPRO_USER_CODE_REGION_END        #region Names
        /// <summary>More names added for consistency of access</summary>
        public static partial class Names
        {
------

It would seem that the first line is appended directly after the REGION_END comment rather than the next line.
Walaa (Support Team)   Posted on: 20-Feb-2019 21:07:05.
Is this a Custom_EntityAdapterTemplate ?

simmotech (User)   Posted on: 20-Feb-2019 22:03:10.
Walaa wrote:
Is this a Custom_EntityAdapterTemplate ?

Yes - it worked fine in v4.2 but in v5.5 I had to add a blank line at the top to prevent the issue described above.
Otis (LLBLGen Pro Team)   Posted on: 21-Feb-2019 10:21:56.
We'll correct it in the next release (5.5.2).

The statements are on the same line to prevent empty lines in the output for the situation where there's no include template (which is usually the case). However it shouldn't be the case where it ruins code with include templates of course.


Otis (LLBLGen Pro Team)   Posted on: 21-Feb-2019 11:07:51.
Fixed in next build of 5.5.2. (We'll push a new hotfix soon)