fields.DefineField brings Visual Studio to a hault

Posts   
 
    
TogasPoon
User
Posts: 42
Joined: 09-Feb-2006
# Posted on: 18-Feb-2009 15:57:11   

2.0.0.0 Selfserving .NET 2.0 SQL Server 2008

I don't think this is a llblgen bug but I wasn't sure where to put this. In the last couple of weeks I haven't been able to type fields.DefineField and continue without VS hanging for about a minute. After that if I try and continue the typing of my code the same thing happens. If I comment out the line I can create it and then remove the comment and everything runs fine. I'm not sure if it has something to do with intellesence of something else but am hoping someone know what's going on.

Before this started happening I had no issues with these types of coding (going back 2 years).

Any thoughts?

Walaa avatar
Walaa
Support Team
Posts: 14950
Joined: 21-Aug-2005
# Posted on: 18-Feb-2009 16:32:39   

This surely sounds like a VS issue, I supose you are using VS 2005. Did you have SP1 installed?

Do you have many references in your project? (maybe you need to clean any old or mismatching dlls).

Can you reproduce this on another machine?

TogasPoon
User
Posts: 42
Joined: 09-Feb-2006
# Posted on: 18-Feb-2009 17:05:20   

Yes, I think it's a VS issue too. I'm just not sure what that issue is and the only time it pops up is with the fields class.

I'm using VS 2008.

I don't have many references in my project: MSI.Main <- my llblgen da layer PeterBlum.Des SD.LLBLGen.Pro.ORMSupportClasses.NET20 System System.Data System.Xml

I've tried refreshing MSI.Main to no avail.

I currently don't have another machine to test this on.

W

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39614
Joined: 17-Aug-2003
# Posted on: 18-Feb-2009 17:56:38   

This is caused by the fact that you likely have the backwardscompatibility templates set above the v2.0 specific templates. This leads to a LOT of overloads (with all the enums) for DefineField for example. Go to the generator configuration dialog, tab 2 and move backwards compatibilty templates to the bottom, regenerate and it should be fixed. This will break old(er) code, so you either have to fix that (i.e. use fields.DefineField(CustomerFields.CustomerId, 1) instead of fields.DefineField(CustomerFieldIndex.CustomerId, 1) or go back to the backwards compatibility templates.

Frans Bouma | Lead developer LLBLGen Pro
TogasPoon
User
Posts: 42
Joined: 09-Feb-2006
# Posted on: 18-Feb-2009 18:09:10   

That was it!

Thanks for the quick responses.

Warren