Build errors compiling the generated code

Posts   
 
    
geminigem
User
Posts: 6
Joined: 26-Mar-2010
# Posted on: 26-Mar-2010 19:59:32   

Hi,

I am a newbie and my client uses llblgen. I find it great as it is easy until I got these build errors. I generated the code from llblgen in vb.net, self servicing, .net 2.0. Then I tried to build the generated code using 1. created a new class library, draged and dropped the generated code folders to this project. Then, build project in vs 2005, failed with around 100 errors. 2. created a new project from existing code. Again errors 3. Added a new class library to my existing project. 4. Added the generated code as an existing project.

None of those worked. What is the exact procedure of building the generated code using self service without any errors?

I also added the correct references below SD.LLBLGen.Pro.DQE.SqlServer.NET20 SD.LLBLGen.Pro.ORMSupportClasses.NET20

Can anyone help me please?

Thanks, G

geminigem
User
Posts: 6
Joined: 26-Mar-2010
# Posted on: 26-Mar-2010 20:05:14   

More Information:

LLBLGen Pro Version: 2.6 Final (June 6th, 2008 ) Template Group: Self Servicing .NET Version: 2.0 Database: Sql Server 2005

I have not modified anything in generated code.

Let me know if you need any more information.

Thanks, G

geminigem
User
Posts: 6
Joined: 26-Mar-2010
# Posted on: 26-Mar-2010 20:18:53   

To be more clear, when I started working on this project, the code was already generated and compiled to dll and eveything was working fine. Recently I had to add a table in the database and re-generate the code using LLBLgen. Generating code was fine but building the code failed with lots of errors like: 1. syntax error 2. 'Imports' statements must precede any declarations 3. First statement of a method body cannot be on the same line as the method declaration.

and a warning message: Namespace or type specified in the Imports 'C' doesn't contain any public member or cannot be found. Make sure the Namespace or the type is defines and contains at lease on public member. Make sure the imported element name doesn't use any aliases. (for all .vb classes)

The above 3 errors and warning message keeps on repeating (around 100 errors) Finally says exceeded the maxinmum number of errors.

What is the problem with those erros?

Please help me.

Thanks, G

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 26-Mar-2010 22:33:26   

Ok. Please verify this checklist: 1. You are using the same LLBLGen version that the generated old files. 2. You are referencing the correct LLBLGen DLL version. 3. If the problem persists, try to generate to an empty folder, then use those generated projects.

David Elizondo | LLBLGen Support Team
geminigem
User
Posts: 6
Joined: 26-Mar-2010
# Posted on: 26-Mar-2010 23:14:25   

Thanks for replying.

Yes, I am using the same LLBLGen version. I copied the same software they are using.

New Project folder was created by LLBLGen itself and all the files were saved in the new folder created by LLBLGen.

As I noted before, I am referring those DLL's only.

SD.LLBLGen.Pro.DQE.SqlServer.NET20.dll SD.LLBLGen.Pro.ORMSupportClasses.NET20.dll

I followed the following steps: 1. added a new project in VS 2005, selected classlibrary template. Added the above 2 references. 2. Created a new folder and generated the classes. 3. Dragged and dropped those generated files and folders in the classlibrary project in vs. 4. Tried to build the solution but it again failed with same errors.

Is this the right way to do?

Thanks, G

daelmo avatar
daelmo
Support Team
Posts: 8245
Joined: 28-Nov-2005
# Posted on: 27-Mar-2010 02:55:37   

Your problem is in step 3. Adding just the files doesn't add the references, etc. So just add the generated project(s) to your solution. Then recheck the referenced assemblies and build the generated project(s). After that, verify that yor custom project (GUI for example) is referencing your generated project.

David Elizondo | LLBLGen Support Team
geminigem
User
Posts: 6
Joined: 26-Mar-2010
# Posted on: 29-Mar-2010 17:22:57   

Yes, that is where exactly I am facing the problem. Can you please guide me how to add the generated project to the solution. Right now, I have the folder DAL with all the generated files in it.

case 1: I created a new project (type website). Then clicked on add ->existing project. I clicked on the folder DAL to add that project. Doing that did not add the complete folder. When I clicked on DAL to add the folder, it opened the folder to show all its sub-folders collection classes,entity classes etc. There is no way I could add the complete folder to my solution. It can only add project if it has DAL.dll file. But the project is not yet compiled to build out .dll file. How do we build the folder to get DAL.dll file?

case 2: So, I created a new project (type website). Then clicked on add->existing website. I now clicked on the folder DAL and this added the folder to my solution. But this did not compile all its sub-folders.

case 3: So, I created a new project (type class library). Then, clicked on add ->existing website. Then, added my GUI website to the sol. Here I got 100 errors.

Could you please explain me briefly about adding the generated project? I tried all the 3 cases above. I have been trying to solve this issue since 1 week and I am unable to find a solution. Please help!

Thanks, G

geminigem
User
Posts: 6
Joined: 26-Mar-2010
# Posted on: 29-Mar-2010 17:38:09   

I finally found the solution and the problem. I was not generating the files properly.

I gave complete path to DAL folder in both the root namespace and destination root folder. When I changed the root namespace as just DAL instead of complete path, it worked correctly and gave me the DAL.vbproj that I can now add to my solution without any problem. sunglasses

Thanks, G