Compilation problems

Posts   
 
    
jovball
User
Posts: 443
Joined: 23-Jan-2005
# Posted on: 13-Jul-2005 08:56:25   

I am a new LLBLGen Pro user and would like to like the program but I am simply having a miserable time trying to get the code to compile. rage I am using the July 7 installer and the July 8 runtime libraries.

I seem to cycle through several problems and can never get rid of all of them. I can successfully build the DbSpecific and the DbGeneric projects (in that order). After that, I add those projects and the ORMSupportClasses references to my ASPX project.

When I attempt to build the ASPX project, I get a warning that the ORMSupportClassesNET11 dll cannot be copied to the bin folder because it would overwrite one that is is there already. I can change the copy local setting to false and this warning will go away. As soon as I write any code that attempts to get data, I start getting errors saying that various methods require the ORMSupportClassesNET11 which is not referenced by the project. (For example, adapter.FetchEntityCollection.)

However, it IS referenced by the project.

Am I doing something wrong here? How can I make these build errors go away?

Joel Reinford

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 13-Jul-2005 10:05:03   

This is an issue with vs.net. There is a hotfix for this available from MS to solve this, the KB number is: 887818 . You can call Microsoft's PSS to achieve this fix. See: http://support.microsoft.com/default.aspx?scid=kb;en-us;887818

I'm not allowed (by microsoft) to distribute this fix myself, although the fix is from October 16th, 2004 !! frowning .

Though, you can work around it by either doing: 1) place your generated code in a separate solution, compile the two assemblies, then in your actual project solution, reference the assemblies

OR

2) place all projects in a single solution, set all copy locals to false for ormsupportclasses and manually copy the files to the bin folder

OR

3) as 2 but place the ORM support classes in the GAC manually. Be aware that when you install an update, you have to manually update these files.

Trust me, I'm fed up with this bug in vs.net even more than you are and it truly sucks that I have the fix right here but can't give it to my customers. I've contacted Microsoft about their stupid Hotfix policy a dozen times already, last time this morning. Everytime they start by listening and offering better times but these never come.

I've asked my MVP lead to distribute my rant on this (http://weblogs.asp.net/fbouma/archive/2005/07/13/419205.aspx) to the person inside MS so it perhaps gets somewhere. If I get the green light to distribute this hotfix I'll mention it here of course.

Frans Bouma | Lead developer LLBLGen Pro
jovball
User
Posts: 443
Joined: 23-Jan-2005
# Posted on: 14-Jul-2005 06:55:32   

I opted for #2 and that worked.

Since that point, my experience has been good with one exception. One of the generated SQL statements is invalid. I have pasted it below. Note that the second table is aliased in the FROM clause but not in the SELECT clause. Any suggestions on how to fix this or why it is happening would be appreciated.

exec sp_executesql N'SELECT DISTINCT [CccFriends].[dbo].[VolunteerInterest].[VolunteerInterestID] AS [VolunteerInterestId] ,[CccFriends].[dbo].[VolunteerInterest].[PartyID] AS [PartyId] ,[CccFriends].[dbo].[VolunteerInterest].[VolunteerActivityTypeID] AS [VolunteerActivityTypeId] ,[CccFriends].[dbo].[VolunteerInterest].[LocationID] AS [LocationId] ,[CccFriends].[dbo].[VolunteerInterest].[Active] AS [Active] FROM (( [CccFriends].[dbo].[Party]
INNER JOIN [CccFriends].[dbo].[VolunteerInterest] [VolunteerInterest]
ON [CccFriends].[dbo].[Party].[PartyID]=[VolunteerInterest
].[PartyID]) INNER JOIN [CccFriends].[dbo].[Location]
ON [CccFriends].[dbo].[Location].[LocationID]=[VolunteerInterest_].[LocationID]) WHERE ( [CccFriends].[dbo].[Party].[PartyID] = @PartyID1)' , N'@PartyID1 int', @PartyID1 = 105310

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39933
Joined: 17-Aug-2003
# Posted on: 14-Jul-2005 09:51:34   

Please post your code which results in this query. I think you specified an alias with a predicate which then results in a table alias but not in the select list.

Frans Bouma | Lead developer LLBLGen Pro
jovball
User
Posts: 443
Joined: 23-Jan-2005
# Posted on: 18-Jul-2005 17:16:04   

Of course this was my mistake. I had the wrong GetRelation... in the bucket. flushed