V2.0 LPT templates vs v1.x Templates

Posts   
 
    
ADF1969
User
Posts: 37
Joined: 28-Mar-2006
# Posted on: 30-Sep-2006 08:20:37   

Did the syntax for v2.0 LPT templates dramatically change?

I have 7 LPT templates that while not highly complicated, work flawlessly under v1.2005 but under v2.0 generate 30-50 errors each.

Here is one of them (the simplest) - it generates 36 errors:


<[ System.IO ]>
<[ System.Text ]>
<[ SD.LLBLGen.Pro.LptParser ]>
<[ SD.LLBLGen.Pro.ApplicationCore ]>
<[ SD.LLBLGen.Pro.ApplicationCore.Entities ]>
<[ System.Diagnostics ]>

' Imports
Imports NUnit.Framework
Imports <%=BaseNameSpace%>.EntityClasses


Namespace <%=BaseNameSpace%>.Tests

    <TestFixture()> _
    Public Class DatabaseFixture

        Private m_rollbackInTearDown As Boolean = True
        Public Property RollbackInTearDown() As Boolean
            Get
                Return m_rollbackInTearDown
            End Get
            Set(ByVal Value As Boolean)
                m_rollbackInTearDown = Value
            End Set
        End Property

        <SetUp()> _
        Public Sub StartTransaction()
            Console.WriteLine("DatabaseFixture.StartTransaction()")
            Console.WriteLine("***NOTE: UnitTests have an issue testing char() fields > 40 chars. That issue has not been addressed yet.")
            TransactionManager.BeginTran()
            Insert()
        End Sub

        Public Overridable Sub Insert()
            Console.WriteLine("DatabaseFixture.Insert()")
        End Sub

        <TearDown()> _
        Public Sub Rollback()
            If Me.m_rollbackInTearDown Then
                Console.WriteLine("DatabaseFixture.Rollback()")
                TransactionManager.Rollback()
                Console.WriteLine("")
            Else
                If (Not TransactionManager.Transaction Is Nothing) Then
                    TransactionManager.Commit()
                End If
            End If
        End Sub
    End Class

End Namespace


<~

    ' >> PROPERTIES <<
    Public ReadOnly Property BaseNameSpace() As String
        Get
            Return _executingGenerator.ProjectDefinition.RootNameSpace          
        End Get
    End Property

    Public m_CurrentEntity As EntityDefinition
    Public Property CurrentEntity As EntityDefinition
        Get
            Return m_CurrentEntity
        End Get
        Set
            m_CurrentEntity = value
        End Set
    End Property

    Public ReadOnly Property ObjectName As String
        Get
            Dim e As EntityDefinition = CurrentEntity
            If (Not (e) Is Nothing) Then
                Return e.Name
            End If
            ' unknown object
            Return "Unknown"
        End Get
    End Property

~>

And here are the errors I get when I try to compile it:

Well, I would cut-and-paste them, but the Templates Studio's "Application Output" is not "cut-and-pastable" - so in order to check you will have to paste my code and compile it...sorry.

I looked all over the forum for other code issues but didn't see much.

Thanks for any help you can provide.

Andrew.

ADF1969
User
Posts: 37
Joined: 28-Mar-2006
# Posted on: 30-Sep-2006 08:50:46   

Okay, I think the problem was DLL files that were out of whack.

I uninstalled LGP2 and installed the latest version and all seems to be well.

One minor complaint, however: There is not "upgrade" option for LGP so I have to uninstall to reinstall, no biggie, but when it "uninstalled* it deep-6xed (as in deleted) my custom "templates" folder...now, normally that guy is under CVS, but since I just started working with it, he was not...fortuantely, I had not made many changes, so the loss was not a big deal...however, if I had....I would be one unhappy camper.

I would request the following: 1) add a "re-install" option so we can upgrade verions 2) remove the whatever option in the "Uninstaller" that clobbers and removes the extra dirs - if I added a dir to the folder, just leave it..I"ll clean up after myself simple_smile

Thanks,

Andrew.

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39786
Joined: 17-Aug-2003
# Posted on: 30-Sep-2006 13:18:53   

ADF1969 wrote:

Okay, I think the problem was DLL files that were out of whack.

I uninstalled LGP2 and installed the latest version and all seems to be well.

One minor complaint, however: There is not "upgrade" option for LGP so I have to uninstall to reinstall, no biggie, but when it "uninstalled* it deep-6xed (as in deleted) my custom "templates" folder...now, normally that guy is under CVS, but since I just started working with it, he was not...fortuantely, I had not made many changes, so the loss was not a big deal...however, if I had....I would be one unhappy camper.

Uninstall shouldn't remove files which aren't in the list of files to install in the first place. That's also why your license file for example isn't removed when you uninstall.

I would request the following: 1) add a "re-install" option so we can upgrade verions

I tried, but I couldn't get it to work, no matter what I tried. The installer is build with VS.NET 2005's deployment project, and moving to another package is very cumbersome, so I've to stick with this. I'll give it another try, perhaps I've missed something.

2) remove the whatever option in the "Uninstaller" that clobbers and removes the extra dirs - if I added a dir to the folder, just leave it..I"ll clean up after myself simple_smile

It shouldn't remove these folders. I'll see if I have accidently set a flag which says to remove installed folders if they're not empty, not sure. Sadly, there aren't much options to set in this lame vs.net 2005 deployment project type. rage

ALso, the applicationoutput window contains a richtextbox, very strange that you can't copy selected text. I'll see if I can fix that or add some options for that, because it's of course necessary to be able to copy error texts, for example for support purposes.

Frans Bouma | Lead developer LLBLGen Pro